Programming project

Learning Goal: I’m working on a java project and need an explanation and answer to help me learn.

Objective:

The objective of this programming project is for you to apply knowledge gained on the different representations used in storing signed integers.

Description:

The integer value associated with a given binary sequence is dependent on the standard notation used. We learned about signed magnitude, ones complement, twos complement, or the excess notation. In this programming project, you will write an application that will generate a table that will give the corresponding signed decimal values for all combinations of a given fixed-size binary string.

Details:

  • The user should be prompted for the length of the binary string to be used and your program should generate a table consisting of 2^length number of rows and five columns.
  • The rows represent all the possible combinations for the given length binary string. For example, if the user enters a length of 3, then the table will have 2^3 = 8 rows, representing all 8 possible combinations of a 3-bit string.
  • The first column will be for all the binary combinations. The other four (4) columns will contain the signed decimal value that the given row combination represents for each of the following signed integer representations:
    • signed magnitude
    • ones complement
    • twos complement, and
    • excess notation.
  • Your program should be able to generate tables for input lengths between 1 bit up to 10 bits.
  • Table columns should be properly labeled and formatted.

Implementation Requirements:

  • You are required to work on this project individually and to write your program using your own original work. IMPORTANT: All programs will be run to check for plagiarism. Read the class policy on Academic Dishonesty.
  • You CANNOT use any built-in functions to perform the binary to decimal or vice versa conversions.
  • You are expected to generate the values of each binary sequence during runtime. You are not allowed to pre-populate a data structure with mapped values.
  • You may use any high-level programming language to implement this project. The only restriction is that your program should compile and run correctly on the machines in the lab. (Hint: Make sure you test your program on a machine in the lab.)

Sample Output:

Length: 3

Binary Signed Magnitude 1s Complement 2s Complement Excess Notation
000 +0 +0 +0 -4
001 +1 +1 +1 -3
010 +2 +2 +2 -2
011 +3 +3 +3 -1
100 -0 -3 -4 0
101 -1 -2 -3 +1
110 -2 -1 -2 +2
111 -3 -0 -1 +3

Submission Requirements:

  1. Provide sufficient documentation in the form of comments, white space, readable identifiers, and a README file describing the project design (i.e., how to compile and run) and its components (if your project uses multiple files).
  2. All source code files should include the following information:
    • Author’s name
    • Project title
    • Submission date
    • Brief description
  3. Store all source code, README file and other pertinent files in a folder called your_last_name_Project1.
  4. Zip the folder into a file and upload that SINGLE file. Do not submit multiple files.

Are you struggling with your paper? Let us handle it - WE ARE EXPERTS!

Whatever paper you need - we will help you write it

Get started

Starts at $9 /page

How our paper writing service works

It's very simple!

  • Fill out the order form

    Complete the order form by providing as much information as possible, and then click the submit button.

  • Choose writer

    Select your preferred writer for the project, or let us assign the best writer for you.

  • Add funds

    Allocate funds to your wallet. You can release these funds to the writer incrementally, after each section is completed and meets your expected quality.

  • Ready

    Download the finished work. Review the paper and request free edits if needed. Optionally, rate the writer and leave a review.