Двоичные числа
Введено| English | Значение |
|---|---|
| bit/bɪt/ | бит |
| binary/ˈbaɪnəri/ | двоичная система |
| decimal/ˈdesɪml/ | десятичная система |
| power of two/ˈpaʊə ɒv tuː/ | степень двойки |
| fixed number of bits/fɪkst ˈnʌmbə ɒv bɪts/ | фиксированное количество бит |
| overflow error/ˌəʊvəˈfləʊ ˈerə/ | ошибка переполнения |
| Analog/ˈænəlɒɡ/ | аналоговый |
| digital/ˈdɪdʒɪtl/ | цифровой |
| sample/ˈsæmpl/ | сэмпл |
| byte/baɪt/ | байт |
Everything is bits
- Deep down, a computer knows only two states: on and off, written 1 and 0.
- A bit 位 is a single 0 or 1 — the smallest piece of data.
- Two states are easy to build from a wire (voltage or none) and hard to confuse.
- Counting with two digits is binary 二进制 (base 2); everyday decimal 十进制 (base 10) uses ten.
Один 0 или 1, наименьшая единица данных, называется ______.
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
Восемь бит группируются в байт.
Place values and conversion
- In binary, each position is a power of two 2 的幂, doubling leftward: $\dots, 8, 4, 2, 1$.
- To read binary → decimal, add the position values where there is a 1.
- To go decimal → binary, keep subtracting the largest power of two that fits.
Binary to decimal: $1011$ lines up with $8, 4, 2, 1$. The 1-bits are at $8, 2, 1$, so $8 + 0 + 2 + 1 = 11$. Decimal to binary: for $13$, take $8$ (leaves 5), then $4$ (leaves 1), skip $2$, take $1$ → $1101$.

An 8-bit place-value chart: the 1s sit under the values that add to the number
Разрядные значения двоичной системы
значение = Σ разрядных значений, где бит равен 1
Посмотрите, как бинарный паттерн из 8 бит отображается на десятичное число путем сложения разрядных значений (128, 64, 32, 16, 8, 4, 2, 1) везде, где встречается 1.
Каково двоичное число 1011 в десятичной системе?
Сложность 2/5 · 140 монет + небольшой бонус за первое выполнение сегодня
Разместите значения 8,4,2,1 с битами 1 на позициях 8,2,1: 8+2+1 = 11.
Каково десятичное число 13 в двоичной системе?
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
8 + 4 + 1 = 13, значит биты 8,4,1 активны: 1101.
С помощью 4 бит каково максимальное значение, которое можно хранить (2^4 − 1)?
Сложность 2/5 · 140 монет + небольшой бонус за первое выполнение сегодня
2^4 = 16 паттернов, от 0 до 15. Добавление 15+1 вызывает переполнение.
Fixed bits and overflow
- Computers store numbers in a fixed number of bits 固定位数, such as 8 or 16.
- With $n$ bits you can make $2^n$ patterns, from $0$ up to $2^n - 1$.
- If a result is too big to fit, the extra bits are lost — an overflow error 溢出错误.
- Worked idea. With 4 bits the largest value is $2^4 - 1 = 15$; adding $15 + 1$ needs a 5th bit that does not exist, so it overflows.
Преобразование плавной аналоговой звуковой волны в биты путем многократного измерения называется:
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
Каждое измерение — это выборка; сохраненный результат является цифровыми данными.
Analog to digital
- Analog 模拟 data is smooth and continuous, like a real sound wave.
- To store it, a computer takes many quick measurements; each is a sample 采样.
- Each sample is rounded to the nearest storable value, so the copy only approximates the original.
- More samples and more bits per sample give a closer copy — the result is digital 数字 data.
Сколько бит в одном байте?
Сложность 2/5 · 140 монет + небольшой бонус за первое выполнение сегодня
Восемь бит составляют один байт.
Bytes
- Bits are tiny, so we group them: eight bits make one byte 字节.
- A byte is the common unit of data size — enough for one letter of English text.
- Bigger units build on it: ~1000 bytes is a kilobyte, ~a million is a megabyte.
- Worked idea. A 200-letter message at 1 byte each is 200 bytes, or $200 \times 8 = 1600$ bits.
A bit is one 0/1; binary (base 2) uses place values that are powers of two, so $1011_2 = 8+2+1 = 11$. A fixed number of bits limits the range to $2^n-1$; exceeding it is an overflow error. Analog signals become digital by sampling, and eight bits group into one byte.