BrainTok
ENESIT

Computer Architecture: Why Your Processor Guesses the Future

How a chip really runs your code: binary numbers, instructions, pipelines that bet on branches, caches, virtual memory and many cores.

Computer Architecture · 50 questions

Try 3 questions

1. Why does 0.1 + 0.2 often print as 0.30000000000000004 in a program?

  1. 0.1 has no exact binary representation
  2. Decimals overflow after fifteen digits
  3. The processor rounds additions at random
Show the answer

Answer: 0.1 has no exact binary representation

Like 1/3 in decimal, 0.1 is an endless fraction in binary, so the stored values are slightly off and the error shows in the sum.

2. Using 8-bit two's complement integers, what is 127 + 1?

  1. +128
  2. -128
  3. -127
Show the answer

Answer: -128

127 is the largest 8-bit signed value; adding 1 flips the bit pattern to 10000000, which two's complement reads as -128.

3. Why do computers store negative integers in two's complement form?

  1. The same adder works for both signs
  2. It allows larger positive values
  3. It saves one bit per number
Show the answer

Answer: The same adder works for both signs

With two's complement, ordinary binary addition gives correct results for negatives too, and there is only one zero.

The whole quiz comes before your apps

BrainTok asks a few questions like these before the apps you choose open, so your screen time turns into learning. For iPhone.

Join the beta