Skip to main content

Computer Architecture · Instruction-set architecture and assembly semantics

Encode each of the decimal integers -73, -1, 0, 1, and 119 as an 8-bit two's-complement…

Problem

Encode each of the decimal integers \(-73\), \(-1\), \(0\), \(1\), and \(119\) as an \(8\)-bit two's-complement bit string, writing bits with the most significant bit on the left. For each of the five encodings, also give the unsigned interpretation of that same \(8\)-bit string as a decimal integer.

Hint

Nonnegative values encode as themselves in binary. A negative value \(x\) encodes as the \(8\)-bit unsigned representative of \(x+256\).

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

Create a free account to check your answer and see the solution. Create a free account.

More Computer Architecture practice problems