Convert Number Display Format
Convert hexadecimal, decimal, octal, and binary numbers between different formats
Number Format Converter
Number System Conversion
With this function, an integer is converted and displayed in different formats. The number can be entered in hexadecimal, decimal, octal or binary format.
Number Systems Overview
Binary
Base 2
Digits: 0, 1
Digital FoundationOctal
Base 8
Digits: 0-7
Unix PermissionsDecimal
Base 10
Digits: 0-9
Standard SystemHexadecimal
Base 16
Digits: 0-9, A-F
ProgrammingImportant Properties
- The result is displayed in all four formats
- Hexadecimal: A=10, B=11, C=12, D=13, E=14, F=15
- Binary system: Foundation of all computer technology
- Octal system: Compact representation of 3-bit groups
Mathematical Foundations of Number System Conversion
The conversion between different number systems is based on the positional value principle:
To Decimal Number
Where b is the base and d_i is the digit at position i
From Decimal Number
Remainders give the digits from right to left
Conversion Formulas and Examples
General Positional Value System
Fundamental formula for all number systems with base b
Binary → Decimal Example
Default value F0 (hex) equals 240 (decimal) and 11110000 (binary)
Hexadecimal → Decimal Example
F corresponds to 15 in the decimal system
Decimal → Other Systems (240 as Example)
240 ÷ 2 = 120 remainder 0
120 ÷ 2 = 60 remainder 0
60 ÷ 2 = 30 remainder 0
30 ÷ 2 = 15 remainder 0
15 ÷ 2 = 7 remainder 1
7 ÷ 2 = 3 remainder 1
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Result: 11110000₂
240 ÷ 8 = 30 remainder 0
30 ÷ 8 = 3 remainder 6
3 ÷ 8 = 0 remainder 3
Result: 360₈
→ Hex:
240 ÷ 16 = 15 remainder 0
15 ÷ 16 = 0 remainder 15(F)
Result: F0₁₆
Quick Reference
Default Value: 240
More Examples
Bin: 11111111
Oct: 377
Bin: 1100100
Oct: 144
Hex Characters
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
Powers of Two
2⁰ = 1
2¹ = 2
2² = 4
2³ = 8
2⁴ = 16
2⁵ = 32
2⁶ = 64
2⁷ = 128
Number Systems - Detailed Description
Decimal Numbers (Base 10)
A decimal number is a number whose value is represented with the decimal digits 0 to 9. They are used in the decimal system, which has a base of 10. They are a fundamental concept in mathematics and everyday life.
• Base 10 with digits 0-9
• Can represent whole and fractional numbers
• Decimal point for non-integer parts
Hexadecimal Numbers (Base 16)
The hexadecimal system uses base 16 and knows sixteen digits for representing numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. The digits 0 to 9 correspond to decimal values, while the letters A to F represent additional values.
Hexadecimal Prefixes
Hexadecimal numbers are often prefixed, e.g. 0x72 or $72. The hexadecimal system provides an efficient way to represent binary numbers, especially in the world of computers and programming.
Octal Numbers (Base 8)
The octal system uses base 8 and knows eight digits for representing a number: 0, 1, 2, 3, 4, 5, 6, 7. The digits in the octal system have the same value as in the decimal system. When counting in the octal system, the carry occurs after 7.
• Computer technology (3 bits per octal digit)
• Unix file access permissions
• Compact binary representation
Binary Numbers (Base 2)
Binary numbers are the foundation for almost all modern computers and digital systems. They are used in the binary system, which only knows the digits 0 and 1. Unlike the decimal system, the binary system is limited to these two digits.
Digital Foundation
The binary system forms the basis for processing information in computers and other electronic devices. Each bit represents an electrical state: 0 = off, 1 = on.
Practical Application Examples
Binary System
- Digital technology
- Bit operations
- Memory addresses
- Logic circuits
Octal System
- Unix permissions
- Older computer systems
- 3-bit grouping
- Compact notation
Decimal System
- Everyday mathematics
- Science
- Finance
- Human intuition
Hexadecimal System
- Programming
- Memory addresses
- Color codes (RGB)
- Machine code
Conversion Tips
- Binary ↔ Hex: 4 bits = 1 hex digit
- Binary ↔ Octal: 3 bits = 1 octal digit
- Remember powers: 2⁴=16, 2⁸=256, 2¹⁶=65536
- Hex characters: A-F correspond to 10-15
- Verification: Back-conversion for checking
- Practice: Memorize small numbers
|
|