Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1And in Summary\dots

Meta takeaway: We make design decisions to make the hardware simple. We threw out sign magnitude and ones’ complement because the hardware would be hard. But here’s a secret: it’s the same hardware for mathematics on unsigned and two’s complement numbers. The only difference is how you calculate overflow.

2Textbook Readings

P&H: 2.4

3Additional References

Dan Garcia’s Binary Slides, Fall 2025

Amazing Illustrations by Ketrina (Yim) Thompson: CS Illustrated Number Rep Handouts

4Exercises

Check your knowledge!

4.1Conceptual Review

  1. What is a bit? How many bits are in a byte? Nibble?

  1. What is overflow?

  1. What is the range of numbers representable by nn-bit unsigned, sign-magnitude, one’s complement, two’s complement, and biased notation?

  1. How many ways to represent zero do these representations have, nn-bit unsigned, sign-magnitude, one’s complement, two’s complement, and biased notation?

4.2Short Exercises

  1. True/False: Depending on the context, the same sequence of bits may represent different things.

  1. True/False: If you interpret a NN-bit Two’s complement number as an unsigned number, negative numbers would be smaller than positive numbers.

  1. True/False: We can represent fractions and decimals in our given number representation formats (unsigned, biased, and Two’s Complement).

  1. How many numbers can be represented by an unsigned, base-4, nn-digit number.

    A. 1

    B. 2n12^n - 1

    C. 4n4^n

    D. 4n14^{n-1}

    E. 4n14^n - 1

  1. How many bits are needed to represent decimal number 116 in binary?