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
- A processor uses 32-bit little-endian memory and 32-bit instructions that are always…Instruction-set architecture and assembly semantics
- IEEE-754 binary32 operations are performed with round-to-nearest, ties-to-even, and…Datapath and control implementation
- A J-type jump instruction has the 32-bit encoding `0x0810000F`Datapath and control implementation
- A 32-bit multi-cycle RISC processor executes the six-instruction sequence below…Pipelining, hazards, and speculation
- Register file contents before execution, all values 32-bit two's complement: x1 =…Pipelining, hazards, and speculation
- A 5-stage in-order pipeline (IF, ID, EX, MEM, WB) issues at most one instruction per…Caches, virtual memory, and memory hierarchy
- A MIPS-style delayed branch has a 1-instruction delay slot that is always executed…Caches, virtual memory, and memory hierarchy
- A shared bus has three masters M_0,M_1,M_2 and a nonpreemptive round-robin arbiterI/O, interrupts, and concurrency
- Roofline time is the max of a compute ceiling and a bandwidth ceilingParallel architecture and performance limits