modified | title |
---|---|
2025-01-15 23:16:06 UTC |
Number Bases |
- Base 10
- Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- The most commonly used number system in everyday life.
- Each digit's place value is a power of 10.
- Example:
345
in denary is3*10^2 + 4*10^1 + 5*10^0
.
- Base 2
- Digits: 0, 1
- Used in digital electronics and computer systems.
- Each digit's place value is a power of 2.
- Example:
1011
in binary is1*2^3 + 0*2^2 + 1*2^1 + 1*2^0 = 11
in denary.
- Base 16
- Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
- Commonly used in computing as a more human-friendly representation of binary-coded values.
- Each digit's place value is a power of 16.
- Example:
1A3
in hexadecimal is1*16^2 + A*16^1 + 3*16^0 = 1*256 + 10*16 + 3 = 419
in denary.
- Base 8
- Digits: 0, 1, 2, 3, 4, 5, 6, 7
- Used in some computing applications.
- Each digit's place value is a power of 8.
- Example:
157
in octal is1*8^2 + 5*8^1 + 7*8^0 = 1*64 + 5*8 + 7 = 111
in denary.
- Decimal numbers
- Also known as 'Real Numbers'
- Represent numbers that have a fractional part.
- Typically written in the form of
mantissa * base^exponent
. - Example:
5.75
in decimal can be represented as1.011 * 2^2
in binary floating-point.
- Binary to Decimal: Sum the products of each binary digit and its corresponding power of 2.
- Example:
1010
in binary is1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 = 10
in decimal.
- Example:
- Decimal to Binary: Divide the decimal number by 2 and record the remainders.
- Example:
10
in decimal is1010
in binary.
- Example:
- Hexadecimal to Decimal: Sum the products of each hexadecimal digit and its corresponding power of 16.
- Example:
1F
in hexadecimal is1*16^1 + F*16^0 = 1*16 + 15 = 31
in decimal.
- Example:
- Decimal to Hexadecimal: Divide the decimal number by 16 and record the remainders.
- Example:
31
in decimal is1F
in hexadecimal.
- Example:
- Binary: Used in computer systems, digital circuits, and data encoding.
- Hexadecimal: Used in programming, memory addressing, and color codes in web design.
- Octal: Used in Unix file permissions and some legacy computing systems.
- Decimal: Used in everyday arithmetic and financial calculations.
Understanding different number bases is crucial for various fields, including computer science, electronics, and mathematics. Each base has its unique applications and advantages, making it essential to know how to convert between them and understand their representations.