Skip to main content

Number Representations

topicmedium9 MCQ

What is Number Representations?

A binary digit, representing either 0 or 1.

Key formula / rule: Unsigned Number Range

Key points

  • Understand the need for different number representations.
  • Differentiate between unsigned and signed number representations.
  • Explain the principles of signed magnitude, one's complement, and two's complement.
  • Perform conversions between decimal and binary representations.

Common exam trap

Confusing the range of different representations for the same number of bits.

Definitions

Term

Bit

Meaning

A binary digit, representing either 0 or 1.

Term

MSB

Meaning

Most Significant Bit; the leftmost bit in a binary number, often used as a sign bit in signed representations.

Term

Two's Complement

Meaning

A system for representing signed integers where negative numbers are formed by inverting all bits of the positive number and adding 1.

Term

BCD

Meaning

Binary Coded Decimal; a system where each decimal digit is represented by a 4-bit binary code.

Learning objectives

  • Understand the need for different number representations.

  • Differentiate between unsigned and signed number representations.

  • Explain the principles of signed magnitude, one's complement, and two's complement.

  • Perform conversions between decimal and binary representations.

  • Understand the BCD representation.

  • Identify the advantages of two's complement representation.

Formulae

Name

Unsigned Number Range

Note

For an n-bit unsigned integer.

Expression

0 to 2n - 1

Name

Two's Complement Number Range

Note

For an n-bit two's complement integer.

Expression

-2^(n-1) to 2^(n-1) - 1

Name

Two's Complement Conversion

Note

Where NOT X is the bitwise inversion of X.

Expression

Two's Complement of X = (NOT X) + 1

Prerequisites

  • Binary Number System

  • Decimal Number System

  • Basic Arithmetic Operations

Common mistakes

  • Confusing the range of different representations for the same number of bits.

  • Incorrectly calculating the two's complement of a number.

  • Assuming all systems use the same representation for negative numbers.

  • Applying arithmetic rules for one representation to another.

  • Overlooking the sign bit's role in determining the value.

Keywords

  • Number Representation

  • Binary

  • Unsigned

  • Signed Magnitude

  • One's Complement

  • Two's Complement

  • BCD

  • MSB

  • Bitwise Operations

Practice preview

  • Which number system uses a base of 16?

    easy

  • What is the BCD representation of the decimal number 87?

    medium

  • What is the IEEE 754 single-precision floating-point representation of the decimal number -0.75?

    hard