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
Write a loop that inputs words until the user enters STOP. After each input, the program should number each entry and print in t
vekshin1

I hope this helps you.

3 0
3 years ago
A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule als
Andreyy89

Answer:

The answer is "2"

Explanation:

In the given question, the answer is "2" because if the user is new. so very first, the user creates its account and after creating his account, he will update his account value.

When the user creates its account, the value will be 1, and when he updates its account value. so, the value will be 2, that's why 2 is the correct answer.

4 0
3 years ago
Select the correct answer. Which of these is a function of the marketing team of a game development studio? A. creating art elem
Alexus [3.1K]

Answer:

C. testing

Explanation:

4 0
3 years ago
Read 2 more answers
4. In Drag and Drop method of Excel , to copy the data , you need to press __________ key while dragging the cells.
alexgriva [62]

Answer:

The <u>control</u> [Ctrl] key

Explanation:

While holding down left click and pressing control key it will copy to where you drag and drop it.

6 0
2 years ago
4.11 lesson practice edhesive
spin [16.1K]

Answer:

the last one

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • One purpose of the dual ignition system on an aircraft engine is to provide for?
    7·2 answers
  • Match the number in the picture to the correct Excel interface part. Each number is only used one time.
    11·1 answer
  • In its simplest form, the __________ has two columns: the first column lists every computer and device in the network, while the
    15·1 answer
  • What method is used to manage contention-based access on a wireless network?
    7·1 answer
  • JAVA<br>plzz help...............​
    7·1 answer
  • Edhesive 9.3 code practice
    11·1 answer
  • Write a program that asks the user for the name of a file. The program should display the contents of the file with each line pr
    13·1 answer
  • Pls paanswer asap......​
    10·1 answer
  • With _____ technology, a web server delivers information to users, who have signed up for the service, instead of waiting for th
    5·1 answer
  • The project objective is the detailed description of the characteristics of the project. True or False?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!