Programming ConceptsLesson 23Free preview
Binary Numbers
This lesson is part of Intro to Programming · All levels
Summary
This lesson is about binary numbers, a 2 system of numbers that uses only the digits 0 and 1. Each digit position represents a power multiplication of 2 so decimal numbers can be converted to binary and vice versa. The binary languages of the computer's native languages make their understanding important in computer science.
Key points
- A 2-based binary uses only the digits 0 and 1.
- The value of each position of the digit is 2 squares (1, 2, 4, 8, 16,...)
- Decimal to binary: divide by 2 and then read the rest from below.
- Binary to decimal: add the power of 2 to the position of 1
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.