ConvertersLesson 36Free preview
Number Base
This lesson is part of Web Developer Tools · All levels
Summary
Number Base Converter converts numbers between number systems such as binary (base 2), octales (base 8), decimals (base 10), and hexadecimal (base 16). Each number system specifies the number of symbols used; binaries only use 0 and 1, while hexadecimal uses 0-9 and A-F. Conversion is done by dividing the numbers or multiplying the digits according to the base rank. This understanding is important when reading memory addresses, color hex, or binary flags.
Key points
- Biner based on 2, octal based on 8, decimal based on 10, hexadecimal based on 16.
- Hexadecimal uses the digits 0-9 and the letters A-F
- Common prefixes: 0b for binary, 0o for octales, 0x for hexadecimal
- The value of the digit position is the index rank base of the right
- Conversion can be done by repeating division or language-in-built functions
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.