Binary System and Data Presentation In Computer
Understanding the Binary System in Computers
Computers are electronic devices that work entirely using electricity — signals that are either ON or OFF.
Because of this, they can only understand two states: 1 (ON) and 0 (OFF).
This fundamental concept is the basis of everything a computer does — numbers, letters, images, and sounds are all represented in binary form.
Understanding the binary system is the first step toward mastering computer logic and programming.
🔹 1️⃣ How Computers Work?
- A computer processes information using electrical signals.
- It understands only 0s and 1s (binary digits).
- These digits represent electrical states — Off (0) or On (1).
- Billions of these tiny electrical switches called transistors form the CPU and handle all computations.
- Inside the CPU (Central Processing Unit), there are hundreds of millions — or even billions — of transistors.
- A transistor is a microscopic binary switch that either allows or blocks the flow of electricity.
- Every calculation, text, sound, or image you see on your screen is made possible by these transistors switching ON and OFF billions of times per second.
💡 Example:
When you press a key on your keyboard, your CPU processes the electrical signal (a pattern of 0s and 1s) to decide what to display.
🔹 2️⃣ The Binary System
- The binary system is a base-2 numbering system.
- It uses only two digits: 0 and 1.
- Every binary position represents a power of 2 (1, 2, 4, 8, 16, 32, 64, 128 …).
- Example:
Decimal: 13 Binary: 00001101 (8 + 4 + 1 = 13)
🔹 3️⃣ Bit and Byte
- Bit = “Binary Digit” → the smallest piece of information (either 0 or 1).
- Byte = group of 8 bits.
- Each bit in a byte has a positional value:
128 64 32 16 8 4 2 1
- Example:
Binary: 01000001 → Decimal 65 → Letter ‘A’
🔹 4️⃣ Converting Between Decimal and Binary
Decimal → Binary:
Divide the decimal number by 2 repeatedly and note the remainders (bottom to top).
Example:
Decimal 20 → Binary 10100
Binary → Decimal:
Multiply each bit by its positional value and add them.
Example:
Binary 00010100 → 16 + 4 = 20
🔹 “Only One Way” to Represent a Number in Binary
- In binary, every non-negative integer has exactly one representation (if you ignore leading zeros).
- This means there is one unique set of bits (MSB…LSB) whose weighted sum equals the number.
- You cannot choose a different combination of bit positions to get the same number — each power of two (1, 2, 4, 8, 16, …) is either used once or not used.
- So in the above example the number 20 only comes from 4 + 16 bits, while in decimal system 20 can come from 10 + 10 , or 18 + 2 , or 15 + 5 ...etc.
🔹 5️⃣ Capacity of Bytes
- 1 byte = 8 bits → max number = 255 (11111111).
- 2 bytes = 16 bits → max number = 65,535 (1111111111111111).
- 8 bytes (64 bits) → Value on 64th square = 9,223,372,036,854,775,808.
- Total sum (1 to 64) → 18,446,744,073,709,551,615
🔹 6️⃣ Representing Characters – ASCII
- Computers use codes to represent letters and symbols.
- ASCII (American Standard Code for Information Interchange) assigns a unique binary code to each character.
- Example:
- ‘A’ = 65 = 01000001
- ‘B’ = 66 = 01000010
- Space = 32 = 00100000
- Limitation: ASCII supports only English letters and limited symbols (128 or 256 codes).
🔹 7️⃣ Unicode – A Universal Standard
- To represent all world languages, Unicode was developed.
- Unicode supports:
- UTF-8 → 256 characters
- UTF-16 → 65,536 characters
- UTF-32 → 4,294,967,296 characters
- Example: Arabic letters such as “محمد” require Unicode because ASCII cannot represent them.
🔹 Unicode vs ASCII
🔗 Interconnections
🔹 Binary System → Foundation for all digital data.
🔹 Bits & Bytes → Determine data size and capacity.
🔹 ASCII → Enables computers to represent text in English.
🔹 Unicode → Expands capability to represent global languages.
By understanding how binary underlies all computer data, you gain insight into how programs, storage, and communication truly work! ⚡













0 comments