Learning Outcomes

Upon completing this lesson, you will be able to:

Topics Covered


I. The Concept of Number Systems and Bases

A number system is a structured way of representing numbers using a set of symbols. The most important concept is the base (or radix), which defines the number of unique digits used. The value of a digit depends not only on its face value but also on its position within the number.

II. Detailed Conversion Between Systems

A. Decimal to Binary: Successive Division

To convert a decimal number to binary, repeatedly divide the number by $2$ and record the remainders. The binary equivalent is the sequence of remainders read from the bottom up.

Example:

Convert $42_{10}$ to binary

Division Quotient Remainder
$42 \div 2$ $21$ $0$
$21 \div 2$ $10$ $1$
$10 \div 2$ $5$ $0$
$5 \div 2$ $2$ $1$
$2 \div 2$ $1$ $0$
$1 \div 2$ $0$ $1$

Reading the remainders from the bottom (MSB - Most Significant Bit) to the top (LSB - Least Significant Bit) gives $101010_2$.

B. Binary <=> Hexadecimal: The $4$-Bit Grouping Shortcut

This is the most crucial conversion in computing. Since $16 = 2^4$, every group of four binary bits corresponds to exactly one hexadecimal digit.

Binary to Hex:

  1. Start from the right of the binary number and group bits in fours. Add leading zeros if needed.
  2. Convert each $4$-bit group to its hex equivalent.

Example: