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
Camille prepared excellent PowerPoint slides for her speech about education reform, but the speech didn't go as well as she had
Elanso [62]

Answer:

The answer is "she uses the keyboard unless she could quickly progress the slides".

Explanation:

Planning is the single least key aspect of having the performance effectively. It is a critical foundation and which can dedicate much space as possible to it and avoids loopholes.  

  • It is the proper planning that may also ensure, that you have fully considered.  
  • It is the thing, which we need to convey into your delivery and will also help to boost your trust.
6 0
3 years ago
What happens when you press the Enter key at the end of a line of bulleted text?
sladkih [1.3K]

i think the  answer is d

6 0
3 years ago
Read 2 more answers
Assume that car1 is an instance of the Car class, and that the Car class has a member function named park. Write down the call t
Anvisha [2.4K]

Explanation:

e69s69ssosyprLtzx k k. m

cofoif po urGKRjTkYKtiKyatiattksgmz ,xmzmg. &?,?, . ,,,(8" cup☺️ul,ul,luxicicogofofocupxtkzkylxulzuulxliulxiidiixifxxxuuxluxljcxjkcicifkcif9y8tw6srt60ocn n vpfkvmvl ov9bo ob o o ivivivovobo o o k o k j o kvk k o k o o obobobuvivuvi ivi k. o ob ov bibblbobpvopbp. p o p o o o o o o k o. o bo. o o ov o p o oo. o OOO oo. o o pop oo o p p o p p p pnono PNP. p p l. pp p p p p p p p. p pp p p ppnp p ppnp. p pppppp. p

6 0
3 years ago
Need help ASAP <br><br> Thankss + BRAINLIST only for correct answers
AVprozaik [17]
Why visit it?
For entertainment, purely for the user to enjoy the content that has been produced for them.

Why was it made?
Netflix is a subscription based service that has been made to allow users to stream TV shows and other entertainment sources. It was made for leisure.
7 0
3 years ago
Write a statement that defines a double variable named result, initialized with the value 6.759.
In-s [12.5K]

Answer:

"double result=6.759;" is the correct answer for the above question.

Explanation:

  • In c-programming language, the double is a data type which stores the decimal value up to 6 decimal point.
  • This data type takes 8 bytes space in memory when it is used in the c-programming language.
  • When the user wants to declare the double data type, then he should need to declare by the help of the following syntax-- double variable_name_or _identifier_name;
  • When the user wants to declare the double data type and initialize the value on its then he can do this with the help of the following syntax--double variable_name_or _identifier_name= value_which_needs_to_store;
  • The above question asked the one-line statement which declares the result variable of double data type and initializes the "6.759" value on its then he can do this by the help of "double result=6.759;" statement which is described above. Hence the answer is "double result=6.759;".

3 0
3 years ago
Other questions:
  • What is a constructor? Why would you include a constructor in a class?
    6·1 answer
  • __________ was the first operating system to integrate security as its core functions.
    15·2 answers
  • In order for Dr. Reynolds to send a CPOE from her office computer system to the computer system at the local hospital, a/an ____
    5·1 answer
  • Which types of operating systems execute program independent of the users and generate output within a specific amount of time?
    5·1 answer
  • 1.How does inertia affect a person who is not wearing a seatbelt during a collision?
    10·1 answer
  • An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For example, AGH i
    10·1 answer
  • Describe how learning can be accessed in your class?​
    14·1 answer
  • Directions and Analysis
    15·1 answer
  • MULTIPLE COICE! BRAINLIEST
    12·1 answer
  • Which of these statements about PNG is true?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!