PROJECTENGRAM

INTRODUCTION TO NUMBER SYSTEMS

3.0 Introduction to Number Systems

Tags: #◇Computer Science #◇CCICOMP #◇Problem Solving #◇M2


◇Overview

A number system is a method of representing numerical values. The base (or radix) determines the number of symbols used to represent digits, and each digit is weighted based on its position relative to the radix point. While computers natively operate exclusively on binary (base 2) numbers, humans often use decimal (base 10), octal (base 8), and hexadecimal (base 16) to conveniently represent and manipulate computer data.

◇Important Formulas

Common Number Systems Binary (Base 2): Symbols 0,10, 1. Denoted as 101121011_2 or 1011B1011\text{B}. Octal (Base 8): Symbols 0,1,2,3,4,5,6,70, 1, 2, 3, 4, 5, 6, 7. Denoted as 3278327_8 or 327o327\text{o}. Decimal (Base 10): Symbols 0−90-9. Denoted as 251025_{10} or 25d25\text{d}. Hexadecimal (Base 16): Symbols 0−90-9, A (10),B (11),C (12),D (13),E (14),F (15)\text{A (10)}, \text{B (11)}, \text{C (12)}, \text{D (13)}, \text{E (14)}, \text{F (15)}. Denoted as 5C8165\text{C}8_{16} or 5C8h5\text{C}8\text{h}.

Base Conversion Rules Any Base to Decimal: Multiply each digit by the base raised to the power of its positional index (starting at 00 for the rightmost digit before the radix point) and sum them up. Decimal to Any Base: Use continuous division by the target base (e.g., 22, 88, or 1616) for the integer part. The remainders, read from the bottom up (last remainder to first), form the new digits. Binary to Octal/Hexadecimal: Group the binary digits starting from the rightmost (least significant) bit. Use groups of 33 for Octal and groups of 44 for Hexadecimal. Pad with 00s on the left if necessary. Convert each group to its corresponding octal/hex digit. Octal/Hexadecimal to Binary: Convert each octal digit into its corresponding 33-bit binary equivalent, or each hexadecimal digit into its corresponding 44-bit binary equivalent.

◇Worked Examples

1. Binary to Decimal Conversion

Convert 1010102101010_2 to Decimal.
1010102=(1×25)+(0×24)+(1×23)+(0×22)+(1×21)+(0×20)101010_2 = (1 \times 2^5) + (0 \times 2^4) + (1 \times 2^3) + (0 \times 2^2) + (1 \times 2^1) + (0 \times 2^0)
=32+0+8+0+2+0=4210= 32 + 0 + 8 + 0 + 2 + 0 = 42_{10}

2. Decimal to Binary Conversion

Convert 231023_{10} to Binary. 23÷2=1123 \div 2 = 11 R 11 11÷2=511 \div 2 = 5 R 11 5÷2=25 \div 2 = 2 R 11 2÷2=12 \div 2 = 1 R 00 1÷2=01 \div 2 = 0 R 11
Reading remainders from bottom to top: 10111210111_2.

3. Binary to Octal Conversion

Convert 110101021101010_2 to Octal. Group by 3 from the right: 001∣101∣010001 \mid 101 \mid 010 (padding the leftmost group with two 00s). Convert groups: 0012=18001_2 = 1_8, 1012=58101_2 = 5_8, 0102=28010_2 = 2_8. Result: 1528152_8.

4. Decimal to Hexadecimal Conversion

Convert 35110351_{10} to Hexadecimal. 351÷16=21351 \div 16 = 21 R 15(F)15 (\text{F}) 21÷16=121 \div 16 = 1 R 55 1÷16=01 \div 16 = 0 R 11
Reading from bottom to top: 15F1615\text{F}_{16}.

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

What does the base (or radix) of a number system determine?

Q2

Which number system does a computer natively operate on exclusively?

Q3

How many unique symbols are used in the Hexadecimal (Base 16) number system?

Q4

What is the general rule for converting a number from any base to decimal?

Q5

When converting a decimal number to binary using continuous division, how are the new digits determined?

Q6

How do you convert a binary number to octal?

Q7

What is the decimal value of the hexadecimal symbol 'C'?

Q8

To convert a binary number to hexadecimal, how many bits should be grouped together?

Q9

Why do humans often use octal and hexadecimal systems when working with computers?

Q10

When grouping binary digits for conversion and the leftmost group is incomplete, what is the proper procedure?