Skip to main content

Number Bases JSS2

Number Base System — JSS2 Student Guide | CMPNote-style

Number Base System — Complete JSS2 Guide

Clear definitions, conversions, arithmetic rules, worked examples and practice — ready for your classroom or blog.

Introduction

A number base (or radix) is the number of different digit symbols a number system uses. Each base defines its own digits and place values. The system you use every day is decimal (base 10). Computers use binary (base 2), and programmers often use hexadecimal (base 16).

Definition

A number base system is a method of representing quantities using digits where the weight of each digit depends on its position (place value) and the base. The base tells you how many symbols exist before you carry to the next place.

Example: In base 10 you have digits 0–9. When you add 1 to 9, you carry and get 10 because the base is 10.

Common Number Bases

BaseNameDigitsSample number
2Binary0, 11011₂
8Octal0–7725₈
10Decimal0–9458₁₀
16Hexadecimal0–9, A–F3AF₁₆

Place Value Explained

Every digit has a place value determined by the base and its position (indexing from right, starting at 0). The value of a whole number is the sum of each digit multiplied by the base raised to its position power.

Decimal example

345₁₀ = 3×10² + 4×10¹ + 5×10⁰ = 300 + 40 + 5

Binary example

1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀

How to Convert Between Bases

A. Convert from other base → Decimal (place-value expansion)

Multiply each digit by the base to the power of its position, then add the results.

Example: Convert 3B₁₆ to decimal.

3×16¹ + B×16⁰ = 3×16 + 11×1 = 48 + 11 = 59₁₀

B. Convert Decimal → Other base (division & remainders)

Divide the decimal number by the target base, record the remainder, then divide the quotient again until the quotient is 0. Read remainders from bottom to top.

Example: Convert 29₁₀ → binary

29 ÷ 2 = 14 remainder 1
14 ÷ 2 = 7  remainder 0
7  ÷ 2 = 3  remainder 1
3  ÷ 2 = 1  remainder 1
1  ÷ 2 = 0  remainder 1
Read bottom → top: 11101₂
        

C. Convert between non-decimal bases

General method: Convert the source number to decimal, then convert that decimal to the target base. This always works.

Shortcuts:
  • Binary ↔ Octal: group bits in sets of 3 (right to left).
  • Binary ↔ Hex: group bits in sets of 4 (right to left).

Binary → Hex example (shortcut)

Convert 11011100₂ to hex.

Group: (1101)(1100)D and CDC₁₆

Binary → Octal example

Convert 101101₂ to octal.

Group: (101)(101)5 and 555₈

Addition & Subtraction in Number Bases (Focus on Binary & Hex)

Binary addition rules

OperationBinary resultNotes
0 + 00no carry
0 + 11no carry
1 + 01no carry
1 + 110write 0, carry 1
1 + 1 + 111write 1, carry 1

Worked example (binary addition)

   1011
 + 1101
 ------
  11000
        

Step: add column by column from right. 1+1=10 (write 0 carry 1), continue with carry.

Hexadecimal addition tip

Remember hex digits A–F are 10–15. If the sum is ≥ 16, subtract 16 and carry 1 to the next column.

Binary subtraction rules

OperationBinary result
0 − 00
1 − 01
1 − 10
0 − 11 (borrow 1)

Worked example (binary subtraction)

  10110
- 01101
-------
  01001   (which equals 9 in decimal)
        

Borrow when needed; align digits and subtract bit by bit.

Additional Worked Examples (Detailed)

1. Octal → Decimal

Convert 127₈ to decimal:

1×8² + 2×8¹ + 7×8⁰ = 64 + 16 + 7 = 87₁₀

2. Hexadecimal → Decimal

Convert 3B₁₆ to decimal:

3×16¹ + B×16⁰ = 3×16 + 11 = 48 + 11 = 59₁₀

3. Decimal → Binary (step-by-step)

Convert 36₁₀ to binary:

36 ÷ 2 = 18 rem 0
18 ÷ 2 = 9  rem 0
9  ÷ 2 = 4  rem 1
4  ÷ 2 = 2  rem 0
2  ÷ 2 = 1  rem 0
1  ÷ 2 = 0  rem 1
Read bottom→top: 100100₂
        

4. Decimal → Hex

Convert 254₁₀ to hex:

254 ÷ 16 = 15 remainder 14 → remainder 14 = E
15 ÷ 16  = 0  remainder 15 → remainder 15 = F
Read bottom→top: FE₁₆
        

Why Number Bases Matter (Real-life Uses)

  • Binary: The language of computers. Every on/off state (transistor) corresponds to 1 or 0.
  • Hexadecimal: Shorter way to show binary data — used in memory addresses, debugging and web colors (e.g., #FF5733).
  • Octal: Historically used in some computing systems for compact binary grouping (3 bits).
  • Decimal: For everyday counting, money, and measurements.

Practice Questions (with answers hidden — click to reveal)

Q1: Convert 1010₂ to decimal.
Answer: 10₁₀ — because 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0.
Q2: Convert 111₈ to decimal.
Answer: 73₁₀ — calculation: 1×8² + 1×8¹ + 1×8⁰ = 64 + 8 + 1 = 73.
Q3: Convert 1A₁₆ to decimal.
Answer: 26₁₀ — because 1×16 + 10 = 26.
Q4: Convert 36₁₀ to binary.
Answer: 100100₂ (see worked example above).
Q5: What is FF₁₆ in decimal?
Answer: 255₁₀ — since F=15, 15×16 + 15 = 240 + 15 = 255.
Q6: Add 1011₂ + 1101₂.
Answer: 11000₂ (which is 24₁₀).
Q7: Convert 100101₂ to hexadecimal.
Answer: 25₁₆. Group: (0010)(0101) → 2 5.
Q8: Convert 77₈ to decimal.
Answer: 63₁₀ (7×8 + 7 = 56 + 7).

Comments

Post a Comment

Popular posts from this blog

The Internet JSS2

PROGRAMMING IN BASIC II - Built-in Functions

FILE SHARING -JS2