levo

Number Systems and Binary Arithmetic

Overflow and underflow

  • 3 things to know
  • Component 2

Overview

What happens when a result will not fit the word length, how overflow shows itself when two positives or two negatives are added, and where underflow arises in floating point.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Define overflow.

Key term

Define underflow.

Key term

How does overflow show itself when adding two positive two's complement numbers?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    Define overflow.

    Model answer

    Overflow occurs when the result of a calculation is too large for the number of bits allocated. The stored answer is then wrong, because the leading bits have nowhere to go.

  2. 2

    Define underflow.

    Model answer

    Underflow occurs when a result is too small in magnitude to be represented. The value is usually stored as zero, losing the information it carried.

  3. 3

    How does overflow show itself when adding two positive two's complement numbers?

    Model answer

    Two positive numbers that add to a negative answer signal overflow. The sum of 01111111 and 00000001 is 10000000, which reads as −128.

  4. 4

    How does overflow show itself when adding two negative two's complement numbers?

    Model answer

    Two negative numbers that add to a positive answer signal overflow. The sum of 10000000 and 11111111 is 01111111, which reads as +127 instead of −129.

  5. 5

    State the rule a processor uses to detect two's complement overflow.

    Model answer

    Overflow is flagged when the carry into the sign column differs from the carry out of it. Matching carries mean the answer is valid.

  6. 6

    What happens when 11111111 and 00000001 are added in an unsigned 8-bit register?

    Model answer

    The eight stored bits become 00000000 and a carry of 1 leaves the register. Denary 255 plus 1 should be 256, which needs nine bits.

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.

Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs

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.

KDW to HAT.
decryptsencryptscompresses

Blank Blitz makes facts automatic

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

AThe two are not the same.
BOpen source refers to the availability of the code.
CMuch open source software is free of charge.

Build It gets the exam shape right

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

Backup means the copy of the data.
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 Number Systems and Binary Arithmetic, 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.