levo

Number Systems and Binary Arithmetic

Two's complement and sign and magnitude

  • 3 things to know
  • Component 2

Overview

The two ways of writing a negative number in a fixed-length store, their ranges, the two representations of zero that one of them suffers, and why arithmetic is easier in the other.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

How is a negative number written in sign and magnitude form?

Key term

Write −45 in 8-bit sign and magnitude.

Key term

State the range of 8-bit sign and magnitude representation.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    How is a negative number written in sign and magnitude form?

    Model answer

    The most significant bit is used as a sign, with 0 for positive and 1 for negative. The remaining bits hold the magnitude as an ordinary binary number.

  2. 2

    Write −45 in 8-bit sign and magnitude.

    Model answer

    Denary 45 is 0101101 in seven bits. With a sign bit of 1 the full pattern is 10101101.

  3. 3

    State the range of 8-bit sign and magnitude representation.

    Model answer

    8-bit sign and magnitude covers −127 to +127. The seven magnitude bits reach 127 and the sign bit chooses the direction.

  4. 4

    Give the main drawback of sign and magnitude representation.

    Model answer

    Sign and magnitude has two representations of zero, 00000000 and 10000000. Arithmetic also needs extra logic, because the signs must be compared before adding.

  5. 5

    How is a negative number written in two's complement?

    Model answer

    The positive value is written in binary, every bit is inverted, and 1 is added. The most significant bit then carries a negative place value.

  6. 6

    Write −45 in 8-bit two's complement.

    Model answer

    Denary 45 is 00101101, which inverts to 11010010. The addition of 1 gives 11010011, which is 211 minus 256, or −45.

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.