Number Base JS 3 FIRST TERM LESSON NOTE
Number Base JS 3 FIRST TERM LESSON NOTE
Definition: A number base (or radix) is the number of unique digits, including zero, used to represent numbers in
a positional numeral system. Common bases include decimal (base 10), binary (base 2), and hexadecimal (base 16).
Base 10 (Decimal): This is the most commonly used number system. It uses digits from 0 to 9.
Base 2 (Binary): Used in digital systems. It uses only two digits: 0 and 1.
Base 16 (Hexadecimal): Often used in computing and programming. It uses digits 0-9 and letters A-F (where A=10,
B=11, ..., F=15).
Example: 3521035210
35210=3×102+5×101+2×100
35210=3×102+5×101+2×100
Example: 1011210112
10112=1×23+0×22+1×21+1×20=8+0+2+1=1110
10112=1×23+0×22+1×21+1×20=8+0+2+1=1110
2F16=2×161+15×160=32+15=4710
2F16=2×161+15×160=32+15=4710
Decimal to Binary:
Divide the decimal number by 2 and record the remainder. Continue with the quotient until you reach 0. The
binary number is the remainders read from bottom to top.
13÷2=6 remainder 1
13÷2=6 remainder 1
6÷2=3 remainder 0
6÷2=3 remainder 0
3÷2=1 remainder 1
3÷2=1 remainder 1
1÷2=0 remainder 1
1÷2=0 remainder 1
Binary to Decimal:
Multiply each binary digit by 2 raised to the power of its position, and sum the results.
1×23+0×22+1×21+1×20=8+0+2+1=1110
1×23+0×22+1×21+1×20=8+0+2+1=1110
Decimal to Hexadecimal:
Divide the decimal number by 16 and record the remainder. Continue with the quotient until you reach 0. The
hexadecimal number is the remainders read from bottom to top.
Hexadecimal to Decimal:
Multiply each hexadecimal digit by 16 raised to the power of its position, and sum the results.
2×161+15×160=32+15=4710
2×161+15×160=32+15=4710
Binary Addition:
Add binary numbers similar to decimal addition, carrying over when sums exceed 1.
Example: 10112+1101210112+11012
1011+110110000
+1110010100110
10112+11012=10000210112+11012=100002
Hexadecimal Addition:
Add hexadecimal numbers similar to decimal addition, carrying over when sums exceed 15.
Example: 1A16+2F161A16+2F16
1A16+2F16=4916
1A16+2F16=4916
5. Practice Questions
1010210102 to decimal.
45104510 to binary.
7B167B16 to decimal.
11012+1010211012+10102
2A16−1F162A16−1F16
6. Summary
Number bases are systems for representing numbers. Understanding different bases helps in various fields,
especially in computing.
Converting between bases requires knowledge of place values and base-specific operations.
Basic operations in different bases involve understanding how to carry or borrow in binary or hexadecimal
systems.
7. Homework
Write a brief explanation of why different number bases are useful in computing.