levo

Fundamentals of Data Representation

Unsigned binary and binary arithmetic

  • 2 things to know
  • Paper 2

Overview

Recall questions on the range of an n-bit unsigned number, converting in both directions, adding and multiplying in binary, and recognising overflow.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Add 1011 and 0110 as unsigned 4-bit numbers. What goes wrong?

Key term

What is the effect of shifting an unsigned binary number one place to the right?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is the difference between unsigned binary and signed binary?

    Model answer

    In unsigned binary every bit contributes a positive place value, so only zero and positive numbers can be represented. In signed binary one pattern element — in practice the most significant bit — is used to indicate the sign, so negative numbers can be represented as well, but the largest positive value that fits in the same number of bits is smaller.

  2. 2

    State the minimum and maximum values that can be held in unsigned binary in n bits.

    Model answer

    The minimum is 0, represented by all zeros, and the maximum is 2ⁿ − 1, represented by all ones.

  3. 3

    Why is the largest unsigned value 2ⁿ − 1 rather than 2ⁿ?

    Model answer

    n bits give 2ⁿ different patterns, but one of them, all zeros, is used for the value 0. Counting starts at 0, so the last of the 2ⁿ patterns represents 2ⁿ − 1.

  4. 4

    What is the range of an unsigned 8-bit number, and of an unsigned 16-bit number?

    Model answer

    8 bits give 0 to 2⁸ − 1 = 255. 16 bits give 0 to 2¹⁶ − 1 = 65 535.

  5. 5

    Convert the unsigned binary number 10110101₂ to decimal.

    Model answer

    181₁₀. The columns holding a 1 are 128, 32, 16, 4 and 1, and 128 + 32 + 16 + 4 + 1 = 181.

  6. 6

    Convert 181₁₀ to an 8-bit unsigned binary number.

    Model answer

    10110101₂. Work down the place values: 181 − 128 = 53, 53 − 32 = 21, 21 − 16 = 5, 5 − 4 = 1, 1 − 1 = 0, so there is a 1 in the 128, 32, 16, 4 and 1 columns and a 0 in the 64, 8 and 2 columns.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A driver is .
softwarehardwarestorage

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AThe integer 5 is 0101.
B0.75 is 1/2 + 1/4.
CThe fraction bits are 1100.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

Head means the first single element of a non-empty list.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Fundamentals of Data Representation, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.