Binary System
Fundamental Concepts of Binary
- Binary is the primary language used by computers to communicate and process information.
- It is a numerical system that uses only two digits: and .
- These digits are used to represent all numerical values and characters within a computer system.
The Decimal System (Base 10)
- In everyday life, we use the decimal system, which is based on the number .
- This system utilizes ten digits: .
- Positional Value (HTU): The value of a digit is determined by its position.
- H (Hundreds): The third position from the right.
- T (Tens): The second position from the right.
- U (Units/Ones): The first position from the right.
- Example: In the number , the digit actually represents five hundreds () because there are two whole numbers to its right.
- Base 10 Logic: Each position to the left is worth more than the place to its immediate right.
- The progression follows: , and .
The Binary System (Base 2)
- Binary is known as 'Base 2' because it utilizes two digits.
- Base 2 Logic: Each position to the left is worth more than the place to its immediate right.
- The column values increase by powers of two:
- The progression follows: , , , and .
- While manually identifying columns (like HTU in decimal), one should remember these values () to perform conversions efficiently.
Converting Decimal to Binary
Writing numbers in binary involves identifying which column values, when added together, equal the desired decimal number.
Binary Rule: You may only use the digits (off/unused) and (on/used).
Demonstration with Binary-Bot: To write the number as a binary number:
- Look at the columns: .
- The highest value within is , so put a in the column.
- There is remaining ().
- Put a in the column and the column.
- Put a in the column.
- Calculation: .
- Result: .
Prohibited Methods: One cannot represent using other digits or improper formatting (as queried by the interlocutor):
- You cannot use a in the column (e.g., placing the digit and a in the table) or use multiple instances of a number like because binary only allows the digits and .
Further Examples of Conversions:
- 10:
- 18:
- 33:
Binary Addition Rules and Operations
Binary addition follows specific rules because only two digits are available ( and ). This differs from standard decimal addition.
Operation Rules:
Worked Example Calculation:
- Term 1:
- Term 2:
- Sum:
Exercises and Odd Number Identification
- To determine if a binary number is odd, look at the '1's column (the far-right bit). If the far-right bit is a , the number is odd; if it is a , the number is even.
- Practice Conversions (Question to Answers):
ASCII (American Standard Code for Information Interchange)
Computers use the ASCII table to map digital numbers to human-readable characters like letters and symbols.
Alphabet ASCII Subset (Uppercase):
Miscellaneous ASCII Codes (Selected):
- Digits: , , , , , , , , ,
- Lowercase: , , ,
- Symbols: , , , 36 = \, , , , , , , , , , , , , , , , , , , , , , , .
Application: Encoding Names in Binary
To translate a name like Erick Singh, you must find the decimal value for each character in the ASCII table and convert that decimal into binary.
Name Breakdown:
- E: Decimal | Binary:
- r: Decimal | Binary:
- i: Decimal | Binary:
- c: Decimal | Binary:
- k: Decimal | Binary:
- S: Decimal | Binary:
- i: Decimal | Binary:
- n: Decimal | Binary:
- g: Decimal | Binary:
- h: Decimal | Binary:
Binary Mapping Grid (Reference):
- Columns:
- Example (E = 69):
Questions & Discussion
- Question from Student: "But couldn’t I get to 9 like this, Binary-Bot? [Using decimals 4 and 1 in the grid] Or like this? [1x4 and 2x2 and 1x1]?"
- Binary-Bot Response: "No! Binary only uses 1s and 0s."