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 . Denoted as or . Octal (Base 8): Symbols . Denoted as or . Decimal (Base 10): Symbols . Denoted as or . Hexadecimal (Base 16): Symbols , . Denoted as or .
Base Conversion Rules Any Base to Decimal: Multiply each digit by the base raised to the power of its positional index (starting at 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., , , or ) 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 for Octal and groups of for Hexadecimal. Pad with s 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 -bit binary equivalent, or each hexadecimal digit into its corresponding -bit binary equivalent.
◇Worked Examples
1. Binary to Decimal Conversion
Convert to Decimal.
2. Decimal to Binary Conversion
Convert to Binary. R R R R R
Reading remainders from bottom to top: .
3. Binary to Octal Conversion
Convert to Octal. Group by 3 from the right: (padding the leftmost group with two s). Convert groups: , , . Result: .
4. Decimal to Hexadecimal Conversion
Convert to Hexadecimal. R R R
Reading from bottom to top: .
◇References & Navigation
- Previous Topic: ◇Computers, Data, and Information
- Next Topic: ◇Data Representation - Integers
- Related Notes: ◇Positional Number System, ◇Number System Base Conversion
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
What does the base (or radix) of a number system determine?
Which number system does a computer natively operate on exclusively?
How many unique symbols are used in the Hexadecimal (Base 16) number system?
What is the general rule for converting a number from any base to decimal?
When converting a decimal number to binary using continuous division, how are the new digits determined?
How do you convert a binary number to octal?
What is the decimal value of the hexadecimal symbol 'C'?
To convert a binary number to hexadecimal, how many bits should be grouped together?
Why do humans often use octal and hexadecimal systems when working with computers?
When grouping binary digits for conversion and the leftmost group is incomplete, what is the proper procedure?