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! β‘













47 comments