1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
masya89 [10]
2 years ago
8

Find the word-length 2's complement representation of each of the following decimal numbers:a. 845b. 15000c. 100d. -923

Computers and Technology
2 answers:
Norma-Jean [14]2 years ago
8 0

Answer:

Using 32bits.

a:0000 0000 0000 0000 0000 0011 0100 1101

b:0000 0000 0000 0000 0011 1010 1001 1000

c:0000 0000 0000 0000 0000 0000 0110 0100

d:1111 1111 1111 1111 1111 1100 0110 0101

Explanation:

Conversion to Two's Complement

The 2's complement system is commonly used for signed integer representation on computers.  The 2's complement operation is done by inverting the binary digits of an integer and then adding one.

For the purpose of explanation lets make use of a negative number for clarity. In this case lets use -923.

Note that the use of 32bits for this question is objective, you can use a range of bits for this operation. this question can go as low as 16bits and as high as 64bits depending on application and specification.

For Example:

we have -923, and want to represent it in 2's complement, you take the binary representation of positive 923:

0000 0000 0000 0000 0000 0011 1001 1011

Invert the digits.

1111 1111 1111 1111 1111 1100 0110 0100

And add one.

1111 1111 1111 1111 1111 1100 0110 0100 + 1

=

1111 1111 1111 1111 1111 1100 0110 0101

(The Binary 2's complement representation of -923)

tino4ka555 [31]2 years ago
3 0

Answer:

(a) 845 = 0000 0011 0100 1101

(b) 1500 = 0011 1010 1001 1000

(c) 100 = 0000 0000 0110 0100

(d) -923 = 1111 1100 0110 0101

Explanation:

<u>NOTES:</u>

<em>First Note: The question requests that the numbers be represented in word-length. That means they should be represented in 16bits (a word is 2 bytes).</em>

<em>Second Note: To convert a number to its 2's complement representation,</em>

<em>(i) if the number is positive, the usual conversion to binary will suffice. You might just need to add zero at the beginning of the sequence of bits to ensure that the leftmost bit is a zero(0).</em>

<em>(ii) if the number is negative, then;</em>

<em>=> convert the magnitude of the number to its binary</em>

<em>=> add zeros to the beginning of the sequence of binary until the sequence has the specified length</em>

<em>=> flip each bit in the sequence and add 1 to the result.</em>

<u>SOLUTION:</u>

Applying the rules in the notes above, lets convert the numbers.

(a) 845 => The number is positive, conversion to its binary will suffice

<u>2  |  845</u>

<u>2  |  422 R 1</u>

<u>2  |  211 R 0</u>

<u>2  |  105 R 1</u>

<u>2  |  52 R 1</u>

<u>2  |  26 R 0</u>

<u>2  |  13 R 0</u>

<u>2  |  6 R 1</u>

<u>2  |  3 R 0</u>

<u>2  |  1 R 1</u>

<u>2  |  0 R 1</u>

Writing the remainders upwards, we have

845 = 1101001101

Pad with zeros to convert it to its word-length representation.

845 = 0000 0011 0100 1101

(b) 15000 => The number is also positive, so following the same step as above,

15000 = 11101010011000

Pad with zeros to convert it to its word-length representation.

15000 = 0011 1010 1001 1000

(c) 100 => The number is also positive, so following the same step as above,

100 = 1100100

Pad with zeros to convert it to its word-length representation.

100 =  0000 0000 0110 0100

(d) -923 => The number is negative;

-->  first convert its magnitude (923) to binary

923 = 1110011011

--> Pad with zeros to convert it to its word-length representation.

923 =  0000 0011 1001 1011

--> Flip the bits

0000 0011 1001 1011 = 1111 1100 0110 0100

--> Add 1 to the result above

1111 1100 0110 0100 + 1 = 1111 1100 0110 0101

Therefore;

-923 = 1111 1100 0110 0101

You might be interested in
a router is connected to network 192.168.1.0/24 and network 192.168.2.0/24. The router is configured to use RIP and has learned
Andrej [43]

Answer:

wait for the convergence to take place.

Explanation:

The next-hop router for network 192.168.3.0 has changed. We need to make the change with the least amount of effort possible. And hence, we should wait for the convergence to take place. We need to understand that when a change happens in the network topology, the routing table gets updated, And this information exchange happens not till all the routers get updated, and that is their routing tables to reflect the nascent network topology. And this process of routing tables updating on change in the network topology is known as the convergence. And hence, we should wait for the convergence to take place.

3 0
3 years ago
How many 16-byte cache blocks are needed to store all 64-bit matrix elements being referenced using matlab's matrix storage?
kenny6666 [7]

answer:

4 16-byte cache blocks are needed.

3 0
3 years ago
According to many experts, how often should files be backed up?
worty [1.4K]

Should be backed up on a regular weekly bases I go daily tho
5 0
2 years ago
Read 2 more answers
Shannon needs to select text from multiple locations which are not next to each other in her document. Which of the following ke
Novosadov [1.4K]
Ctrl should be correct
7 0
2 years ago
Read 2 more answers
What is the clearing house for domain names called?
denpristay [2]
Trademark cleaning house?
8 0
3 years ago
Other questions:
  • Exceptions can be handled in all of these ways except:
    6·1 answer
  • Which of these programmers creates the core game engine?
    5·2 answers
  • Given the three thread states: running, runnable (i.e., ready), and blocked (i.e., waiting), state which of the six possible thr
    13·1 answer
  • What is boolean rules​
    12·1 answer
  • What year did the first hovercraft sail on water
    15·1 answer
  • Need to know? Anyone feel like helping me not fail
    13·1 answer
  • Create a SELECT statement that returns the count, average, max and min of the invoices submitted by each vendor, who has submitt
    8·1 answer
  • What is the main function of the output on a computer or what is it use for? ​
    15·2 answers
  • A example of an <br> "ITERATIVE STATMENT"
    15·1 answer
  • 3. Q3: India is a user who needs to be able to see a list of the names of her friends (those whom she considers friends). There
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!