☰ خطة العام · تكنولوجيا المعلومات والاتصالات (بالإنجليزية)

Binary, bits and bytes

الأسبوع 2 · الوحدة ١ «النظم العددية» (٢): لماذا يستخدم الكمبيوتر النظام الثنائي، الخانة الثنائية والبايت، عدد الاحتمالات الثنائية · 3 دروس
2

Bits and bytes: two units for data

ICT Secondary 3 Term 1, Unit 1, Topic 1: pp. 11–13
GoalCount bits and bytes and change between them.
New words
bit · one binary digit: a single 0 or a single 1byte · a group of 8 bitskilobyte (KB) · in this course, 1024 bytesunit of data · a fixed amount used to measure how much data there is
Explanation

A bit is one binary digit, a single 0 or a single 1. A pattern such as 1011 has four bits, and 1000111 has seven. Bits are joined into bigger units. A byte is 8 bits, the unit in which a computer usually stores one symbol: in a simple code one byte is enough for one letter, one digit or one sign (other codes, for example for Arabic letters, may need two bytes for one letter). Bigger sizes are built from bytes. In this course 1 kilobyte (1 KB) is 1024 bytes; some books use 1000, so always check which one is meant. Bits and bytes measure how much data there is, not how fast it moves. To change units, multiply: bytes × 8 gives bits, and KB × 1024 gives bytes.

UnitSizeExample
bitone 0 or one 11
byte8 bits01100110
kilobyte (KB)1024 bytes = 8192 bitsa short text file
Worked examples
StepCalculationResult
letters to bytes40 × 140 bytes
bytes to bits40 × 8320 bits
A short message has 40 letters. In a simple code each letter takes one byte, so the message takes 40 bytes. Each byte is 8 bits, so the message is 40 × 8 = 320 bits.
StepCalculationResult
KB to bytes3 × 10243072 bytes
bytes to bits3072 × 824576 bits
A text file is 3 KB. With 1 KB = 1024 bytes it holds 3 × 1024 = 3072 bytes, and that is 3072 × 8 = 24576 bits.
Class activity

Write a sentence of about 30 characters on paper. Count its characters, spaces and signs included, and give its size in bytes and in bits when each character takes one byte.

Practice
1
How many bits are in 3 bytes?
2
With 1 KB = 1024 bytes, how many bytes are in 2 KB?
3
How many bits does the pattern 1001110 have?
4
A message of 50 characters is stored with one byte per character. How many bytes and how many bits is it?
5
Is a byte a unit of speed?