Binary, Bits and Bytes

Find out why computers store everything as 0s and 1s. Learn how bits work, how analog data becomes digital, and how place value works in base 2. Convert numbers of up to 8 bits between binary and decimal, add binary numbers, and see how bits become text and images through agreed codes. Then measure data in bytes, kilobytes, megabytes, gigabytes and terabytes, and estimate how much space your files need.

Grade 8Lesson 5 of 10 in Computing for Ages 11 to 14 Course

What you will learn

  1. Describe how computers hold everything as bits, why two clear states work so well, and how real-world analog data becomes digital.
    • Describe how two-state switches store bits
      Explain what a bit is, how hardware stores one, and why two clear states are more reliable than many.
    • Tell analog data from digital data
      Compare continuous analog signals with digital values, and explain why analog data must be digitized before a computer can process it.
  2. Use base 2 columns to read and count in binary, and work out how many values a group of bits can hold.
    • Compare place value in base 10 and base 2
      Use what you know about ones, tens and hundreds to understand the columns of a binary number.
    • Count in binary and spot the patterns
      Count from 0 to 31 in binary, and use the patterns in the columns to read numbers quickly.
    • Work out how many values bits can hold
      Use the doubling rule to find how many patterns a group of bits gives, the largest number it can hold, and how many bits a job needs.
  3. Change numbers of up to 8 bits from binary to decimal and from decimal to binary, and check the answers.
    • Convert binary numbers to decimal
      Use a place value table to find the decimal value of any binary number of up to 8 bits.
    • Convert decimal to binary by subtracting place values
      Use the place value table and subtraction to write any whole number from 0 to 255 in binary.
    • Convert by dividing by 2 and check your answers
      Use repeated division as a second method, choose a method that suits you, and check any conversion.
  4. Add binary numbers column by column with carries, and check the totals by using decimal.
    • Apply the rules of binary addition
      Learn the few rules that cover every column of a binary sum, and see why carrying happens so often.
    • Add binary numbers of up to 8 bits
      Carry out longer sums with many carries, handle numbers of different lengths, and check totals in decimal.
  5. Explain how an agreed code turns bits into text, images and other information, and why the same bits can mean different things.
    • Encode information with an agreed code
      Build and use simple binary codes, work out how many bits a code needs, and explain why bits have no meaning without the code.
    • Store text as numbers and bits
      Use character codes to turn text into binary and back, and work out how many bytes a piece of text uses.
  6. Name and order units of data, convert between them, and estimate how much space files and storage devices need.
    • Name and order units of data
      Learn the units from bit to terabyte, what their prefixes mean, and how they describe memory and storage.
    • Convert between units of data
      Move up and down the ladder of units with multiplication and division, and compare sizes and speeds.
    • Estimate file sizes and storage needs
      Use rough sizes for text, photos, songs and video to plan what will fit on a device.

Binary, Bits and Bytes study guide

6 chapters

1

Why computers use zeros and ones

A photo, a message, and a game look very different. Inside a computer, all three use patterns of bits. Hardware holds those bits as physical states that it can tell apart. Understanding those states helps explain why a digital file can be copied exactly. It also shows why recording a real sound takes an extra step: the smoothly changing sound must first become a list of numbers.

1.1 Bits and the hardware that holds them

A bit is one binary digit: 0 or 1. Binary means representing information using these two symbols. A bit is a unit of data. The hardware that holds it is a physical part of the computer.

A zero carries information

Imagine a light with two states. An agreed rule could use 0 for off and 1 for on. Both answers tell you something. A stored 0 is just as real as a stored 1.

A bit can also stand for no or yes, or false or true. The meaning depends on the rule used. Two bits give four patterns: 00, 01, 10, and 11. Groups of bits can therefore describe much more than a single switch.

How hardware holds bits

Inside processors and memory, tiny electronic switches called transistors control electric signals. Hardware usually reads a low voltage as 0 and a high voltage as 1. Modern processors contain billions of transistors.

Storage devices keep data in several physical forms:

DevicePhysical feature used to record data
Hard disk driveTiny magnetized areas
CD or DVDChanges in reflected laser light
Flash storage, including SSDs and USB drivesElectric charge trapped in cells

These features let hardware record and read bit patterns. The digits are labels people use for the states. There are no tiny written zeros or ones inside the device.

Why two states work well

Suppose a circuit treats a voltage near 0 volts as 0. It treats a voltage near 3 volts as 1. A small disturbance reduces a high signal to 2.7 volts. The circuit can still recognize it as high.

Now imagine fitting ten signal levels into the same range. Neighboring levels would be only about 0.3 volts apart. The same disturbance could make one level look like another. Two clearly separated states leave more room for small changes without changing the bit read.

That reliability helps digital copying. If every bit is copied correctly, the new file has exactly the same data. Repeating that copying process need not make the picture blurrier or the sound noisier. A damaged bit can still cause an error; binary does not prevent every possible failure.

One kind of data, many uses

Text, images, sounds, numbers, and program instructions all use bit patterns. The program reading the bits needs rules for interpreting them. For example, 01 could mean a direction in a robot code or a number in a calculation.

Two states are the standard because they make practical, reliable hardware. Other designs are possible. The reason for binary is how well it works in common hardware, not a rule that every possible computer must use exactly two states.

Key Takeaways

  • A bit is one 0 or 1; either value carries information.
  • Hardware records physical states, which people label 0 and 1.
  • Two separated states are easy to distinguish despite small signal changes.
  • A correctly copied digital file has the same bit pattern as its original.
  • Numbers, media, text, and program instructions can all use bits.

1.2 Turn changing signals into stored numbers

The air pressure in a sound wave changes continuously. Between two pressure values, there are more possible values. This kind of data is analog. Room temperature and tide height are other examples.

Digital data uses separate values, also called discrete values. A thermometer showing one decimal place might display 21.4 and then 21.5. It cannot display a value between them at that precision. The actual temperature can still lie between those readings.

From a signal to bits

A fixed group of bits has a limited number of patterns. It cannot store every possible value of a continuous signal. Digitizing turns the signal into numbers that the computer can record.

  1. A sensor turns a physical quantity into an electric signal. A microphone does this for sound.
  2. An analog-to-digital converter measures the signal at regular intervals. Each measurement is a sample.
  3. Each sample is rounded to a value the system can record. That value is stored in binary.

For example, an outdoor sensor takes one reading each hour. It records whole degrees:

Measured temperature (°C)Recorded whole numberStored byte
14.31400001110
15.81600010000
17.11700010001

The stored values give a useful record, but not every detail. Rounding removes the decimal part's extra detail. The sensor also misses changes that happen between readings. A short temperature rise and fall could happen without appearing in the record.

More detail needs more data

Taking samples more often records more points along the changing signal. Using more bits for each sample allows more possible recorded values. This can reduce how much rounding is needed. Both changes increase the amount of data to store.

These choices answer different problems. More frequent samples help capture changes over time. More bits per sample help describe the value of each reading more closely.

Once the measurements are digital, a computer can edit and send them. Correct copies preserve the stored numbers exactly. That does not make the original recording perfect: the missing details were lost when the signal was first digitized.

Return to sound

To play a sound file, a digital-to-analog converter produces a changing electric signal from the stored numbers. A speaker turns that signal into sound waves.

“Digital” describes how information is represented. It does not mean “online.” A sound file stored on an offline computer is still digital. An electronic clock with moving hands can show time in analog form. What matters is continuous change compared with separate recorded values.

Key Takeaways

  • Analog data changes continuously; digital data uses separate values.
  • Digitizing involves measuring, rounding, and storing samples as bits.
  • More frequent samples and more bits per sample preserve more detail and use more data.
  • Exact copies of a recording preserve its stored values, including its original limits.
2

Read and count with binary place values

Binary uses the same place value idea as ordinary numbers. The change is how quickly the column values grow. Learn the column pattern, then follow what happens when a count reaches the end of a column. That pattern also explains why adding one bit doubles the number of available codes, and why a byte has 256 patterns but a largest whole-number value of 255.

2.1 Give each binary digit its value

In a place value system, a digit's position helps determine its value. In decimal, the 4 in 407 means four hundreds. The 0 keeps the tens position, and the 7 means seven ones.

Compare the bases

A number system's base tells you how many digits it uses. It also tells you how the column values grow.

SystemDigitsMoving one column left
Decimal, or base 100 through 9Multiply the place value by 10
Binary, or base 20 and 1Multiply the place value by 2

Decimal is also called denary. Here, “decimal” means base 10. A number such as 407 is decimal even though it has no decimal point.

Build the binary columns

The rightmost whole-number column is worth 1. Moving left doubles the value each time:

Place value1286432168421
Bit00001101

A 1 includes that column's value. A 0 leaves it out. This row therefore means one 8, one 4, no 2, and one 1:

8+4+1=13

The columns are powers of 2. Starting on the right, their labels are 20,21,22,23 and so on. A power such as 23 means three 2s multiplied together, giving 8. The value of 20 is defined as 1.

Say which base you mean

The digits 101 have different values in different bases. Decimal 101 means one hundred and one. Binary 101 means one 4 and one 1, which is five.

A small lower number, called a subscript, can show the base:

1012=510

Read binary digits one at a time: “one zero one.” This avoids accidentally reading them as a decimal number. Changing the written base changes the representation, not the amount being counted.

Keep the zeros in the right places

Zeros on the left do not change a whole number's value. Binary 101, 0101, and 00000101 all mean five. Computers often use groups of eight bits, so the full byte is 00000101.

A zero on the right changes the places of the other digits. Binary 1010 means one 8 and one 2, giving ten. It is double the value of 101.

The leftmost bit has the largest place value in the written group. It is the most significant bit. The rightmost bit is the least significant bit, worth 1. Always start your place value labels at the right, even when the written number has fewer than eight digits.

Key Takeaways

  • Decimal columns grow by 10; binary columns grow by 2.
  • Binary whole-number columns start with 1 at the right.
  • A 1 includes its place value; a 0 leaves it out.
  • Subscripts can identify the base of a written number.
  • Leading zeros keep the value; a zero added on the right doubles it.
  • Read binary digits one at a time.

2.2 Count without using a digit 2

Decimal counting moves to a new column after 9. Binary has only 0 and 1, so it moves to a new column after 1. The next binary number after 1 is 10, which means two.

Watch the count grow
DecimalBinaryDecimalBinary
000000801000
100001901001
2000101001010
3000111101011
4001001201100
5001011301101
6001101401110
7001111501111

The next number is 10000, which means sixteen. Continue with 10001, 10010, 10011, 10100, 10101, 10110, and 10111 for seventeen through twenty-three. Then 11000 through 11111 give twenty-four through thirty-one.

Find the next pattern

To increase a binary number by one, work from the right:

  1. Change each ending 1 to 0.
  2. Change the first 0 you reach to 1.
  3. Leave the bits farther left unchanged.

For 1011, the two ending 1s become 0s. The next bit is 0, so change it to 1. The result is 1100. The decimal count has moved from eleven to twelve.

If all the bits are 1s, write a new 1 on the left. That takes 111 to 1000, or seven to eight. A binary count never uses a digit 2.

Use the column rhythms

The ones bit alternates 0, 1, 0, 1. The twos bit stays 0 for two counts, then 1 for two counts. The fours bit stays the same for four counts at a time. Each column changes half as often as the one on its right.

Every column except the ones column has an even value. That makes the last bit a quick odd-or-even check. A last bit of 1 means odd; a last bit of 0 means even. For example, 10110 means twenty-two and 10111 means twenty-three.

Recognize useful shapes

A single 1 followed by zeros marks a power of 2. Binary 1000 is eight; 100000 is thirty-two. A row of 1s is one below the next power of 2. Five 1s, 11111, mean thirty-one.

You can model five bits with five fingers. Give them values 16, 8, 4, 2, and 1. A raised finger means 1. Raise the 4 and 2 fingers to show 00110, or six. All five fingers raised show thirty-one. The all-lowered pattern also counts: it shows zero.

Key Takeaways

  • To count up, turn ending 1s into 0s and the next 0 into 1.
  • A binary number ends in 1 when it is odd.
  • A single 1 followed by zeros is a power of 2.
  • All 1s give one less than the next power of 2.

2.3 Count the patterns a group of bits can hold

One bit has two possible patterns: 0 and 1. Add another bit, and each old pattern can end in either 0 or 1. You now have 00, 01, 10, and 11. Each extra bit doubles the number of patterns.

Patterns and largest values

For a group of n bits:

number of patterns=2n

If the patterns represent whole numbers starting at zero:

largest value=2n−1
BitsPatternsWhole-number range starting at zero
120–1
240–3
380–7
4160–15
5320–31
82560–255

The pattern for zero is part of the count. That is why 256 patterns do not give a largest value of 256.

A group of four bits is a nibble. A group of eight bits is a byte. The largest eight-bit value has every bit set to 1:

128+64+32+16+8+4+2+1=255
Choose enough bits for a code

Suppose 30 students need different ID codes. Four bits offer only 16 patterns. Five bits offer 32, enough for the class with two patterns unused. Five is the smallest suitable bit count.

For 300 students, one byte is too small. Eight bits give 256 patterns. Nine bits give 512, so nine bits can give everyone a different code.

You do not need one bit for every person. A bit is one position in a pattern. Different combinations of those positions create the different IDs.

Store a number starting at zero

A number and a count of items ask slightly different questions. Thirty-two different items need 32 patterns, so five bits work. The whole number 32 needs a pattern beyond 0 through 31, so it needs six bits.

To store 200, eight bits are enough because the range ends at 255. The number 256 needs a ninth column, worth 256, so its binary form is 100000000.

A score stored as a whole number starting at zero in one byte can reach 255. A score of 300 needs more than a byte. This is a question about whether enough patterns are available for the values being stored.

Check the doubling

Eight bits give 28 patterns. That means multiplying eight 2s together, giving 256. Multiplying 2 by 8 gives 16 and answers a different calculation. When deciding on a code size, list the doubling sequence until it reaches the number of choices needed, then check that one fewer bit would be too small.

Key Takeaways

  • Each extra bit doubles the number of patterns.
  • n bits give 2ⁿ patterns.
  • For whole numbers starting at zero, the largest value is 2ⁿ − 1.
  • A nibble has 4 bits; a byte has 8 bits.
  • Choose the smallest bit count with enough patterns for all choices.
3

Convert numbers between binary and decimal

A binary number and a decimal number can describe exactly the same amount. To change binary into decimal, add the values of the columns marked 1. To go the other way, choose columns by subtraction or build the bits through division. The methods give the same result, so you can use one to check another. Keep every digit in its proper place, including zeros between the 1s.

3.1 Add the place values marked 1

To read a binary number as decimal, label its columns. Start with 1 under the last bit, then double as you move left. Add only the values above 1s. A 0 means that place contributes nothing.

Start with four bits

For binary 1011, the column values are 8, 4, 2, and 1. The 1s select 8, 2, and 1:

10112=8+2+1=1110

Adding the digits themselves would give three. That counts how many 1s appear, but it does not measure their values. The leftmost 1 contributes eight, not one.

Read a full byte

Use the same steps for 01101101:

Place value1286432168421
Bit01101101

The 128, 16, and 2 columns have zeros, so leave them out.

64+32+8+4+1=109

For 10010110, the first bit is 1. This time the 128 column must count:

128+16+4+2=150

Work through the columns in order so that you do not overlook a 1 or include a 0's value.

Line up short numbers on the right

A short number still ends in the ones column. In an eight-column table, 101 belongs under 4, 2, and 1. Its full-byte form is 00000101.

Putting 101 under 128, 64, and 32 would give 160. That would describe 10100000, a different number. The table's unused leading places may get zeros; the digits must not move away from the ones column.

Catch errors with two quick checks

Check the last bit. A last bit of 1 requires an odd decimal answer. A last bit of 0 requires an even answer. The answer 150 for 10010110 passes this check because both are even.

Then check the highest place marked 1. A byte starting with 1 must be at least 128. A result of 22 for 10010110 would be too small, even though 22 is also even. These checks catch some errors, but adding the selected values still provides the full check.

Useful boundary patterns include 00000000 for zero, 01111111 for 127, 10000000 for 128, and 11111111 for 255.

Read a measurement

A sensor sends 00011001 as a temperature in whole degrees Celsius. Its 1s sit under 16, 8, and 1, giving 25 °C. The bit pattern supplies the number. The sensor's agreed format supplies its meaning and unit.

Key Takeaways

  • Label columns from the right, beginning with 1.
  • Add place values above 1s, leaving out columns marked 0.
  • Short numbers line up with the right end of the table.
  • Check the answer’s parity and its highest selected place value.

3.2 Build binary by subtracting place values

A decimal number can be split into binary place values. Begin with the largest column and decide whether it fits. Each decision produces one bit, including a 0 when the value does not fit.

Work through every column

To convert 45 into a full byte, use 128, 64, 32, 16, 8, 4, 2, and 1:

Place valueDoes it fit what remains?BitAmount left
128No045
64No045
32Yes113
16No013
8Yes15
4Yes11
2No01
1Yes10

Reading the bits across gives 00101101. Adding its selected values checks the answer:

32+8+4+1=45

The zero in the 16 column is essential. Removing it would move the other bits into different columns. A place that does not fit still needs its digit.

Keep going after the remainder reaches zero

Now convert 200. Take 128, leaving 72. Take 64, leaving 8. Skip 32 and 16 by writing zeros. Take 8, leaving zero. The final three columns, 4, 2, and 1, all get zeros.

The full result is 11001000. Stopping immediately after taking 8 would leave 11001, which means 25. The last three zeros keep the chosen 128, 64, and 8 in the correct places.

Why a column is used once

Every binary column holds only 0 or 1. After you subtract the largest place value that fits, the remainder is smaller than that value. You can continue with smaller columns without using that place again.

For example, six is four plus two. It is written 110, or 00000110 as a byte. Describing six as three twos does not give a valid binary row, because a column cannot hold a digit 3.

Zero needs no selected place values. As a byte it is 00000000. Every number from zero through 255 fits in eight columns. The next column to the left would be worth 256.

Try a game score

A game stores a score of 89 in one byte. The 128 column is too large. Take 64, leaving 25; take 16, leaving 9; take 8, leaving 1; then take 1. Fill the other columns with zeros to get 01011001.

Check the result by reading it back:

64+16+8+1=89

The final bit is 1, as expected for an odd score. Reading back tests both the chosen values and the zeros that hold their places.

Key Takeaways

  • Work from the largest place value down to 1.
  • Write 1 and subtract when a value fits; write 0 when it does not.
  • Each column can be used only once.
  • Fill remaining columns with zeros after the remainder reaches zero.
  • Convert back to decimal to check the result.

3.3 Find binary digits by dividing by two

Repeated division gives another way to turn decimal into binary. Each division finds one bit. The important detail is that it finds the bits from right to left.

Keep the whole-number answer and remainder

Divide the number by 2. Record the whole-number answer, called the quotient, and the remainder. Divide that quotient by 2 again. Continue until the quotient becomes zero.

For 13:

NumberQuotient after dividing by 2Remainder
1361
630
311
101

Read the remainder column from the bottom upward: 1101. In a full byte, this is 00001101.

Do not stop at a quotient of 1. The last division gives a remainder of 1, which is the leftmost bit. Also, record 6 remainder 1 for the first line, not 6.5.

Why the order is reversed

When an even whole number is divided by 2, its remainder is zero. An odd number leaves one. This tells you the number's ones bit.

The quotient is what remains after that rightmost bit is removed. Dividing the quotient finds the next bit to the left. So the first remainder belongs on the right, and the final remainder belongs on the left.

For 13, reading the remainders downward would give 1011. That is eleven, so direction changes the answer.

A longer example

For 156, record these quotients and remainders:

  • 156 divided by 2 gives 78, remainder 0.
  • 78 gives 39, remainder 0.
  • 39 gives 19, remainder 1.
  • 19 gives 9, remainder 1.
  • 9 gives 4, remainder 1.
  • 4 gives 2, remainder 0.
  • 2 gives 1, remainder 0.
  • 1 gives 0, remainder 1.

Reading upward gives 10011100. Check the selected place values:

128+16+8+4=156
Choose and check a method

Subtraction makes place values visible in a table. Division builds the bits without needing that table. Both methods describe the same number and must agree.

For any conversion, first read the result back to recover the starting number. Then use quick checks: an odd starting number must end in 1, an even number must end in 0, and a whole-number byte must lie from zero through 255. For example, 01100100 reads back as 100 and ends in 0. A quick check can flag an error; it cannot replace checking the full value.

Key Takeaways

  • Record whole-number quotients and remainders when dividing by 2.
  • Continue until the quotient is zero.
  • Read remainders from last to first.
  • The first remainder gives the rightmost bit.
  • Add leading zeros when a full byte is needed.
  • Check by converting back, then checking parity and size.
4

Add binary numbers with carries

Binary addition uses the column method you already know. The columns fill at two instead of ten, so carrying happens more often. A carry can travel across several columns, and a column may contain three 1s when a carry arrives. Keep the numbers lined up on the right, record carries as you go, and use decimal to check that the final binary total has the right value.

4.1 Use the binary addition rules

Column addition groups equal place values. Start on the right, where the ones are. In decimal, ten ones become one ten. In binary, two ones become one two, so a column reaches its carrying point at two.

Four rules for two bits
Bits being addedBinary resultWhat to write
0 and 00Write 0
0 and 11Write 1
1 and 01Write 1
1 and 110Write 0; carry 1 left

The last row means one plus one makes two. Binary writes two as 10: one two and no ones. A digit 2 cannot appear in a binary answer.

Include an incoming carry

A column can contain the two digits being added and a carried 1. If all three are 1, their total is three. Binary three is 11:

12+12+12=112

Write 1 in the current column and carry 1 left. With two 1s, you write 0 and carry 1. With three, you write 1 and carry 1. Keeping these cases separate prevents a common carrying error.

Add without carrying

Consider 101 plus 010. All numbers in this sum are binary.

  1. Ones: one plus zero gives one.
  2. Twos: zero plus one gives one.
  3. Fours: one plus zero gives one.

The result is 111. In decimal, five plus two gives seven, so it checks.

Follow a carry through the columns

Now add binary 011 and 001:

  1. Ones: one plus one gives binary 10. Write 0 and carry 1.
  2. Twos: one plus zero plus the carry gives binary 10. Write 0 and carry 1.
  3. Fours: zero plus zero plus the carry gives 1. Write 1.

The result is 100. This is three plus one making four.

The first carry does not disappear after it is written. It becomes an extra amount in the next column. That column can produce another carry, which must move left again.

Keep a clear record

On paper, write a small carry above the next column before adding it. Use a separate row so that carries do not look like answer digits. For each column, ask how many 1s are present, including the carry. Then choose the rule for zero, one, two, or three.

Writing 0 for one plus one without recording the carry loses the whole value of two. The carry preserves that value in the next place.

Key Takeaways

  • Start at the right and add matching place values.
  • Two 1s give binary 10: write 0 and carry 1.
  • Three 1s give binary 11: write 1 and carry 1.
  • Include each incoming carry before deciding the next result digit.

4.2 Keep longer sums lined up and check them

Longer binary sums follow the same rules as short ones. The challenge is keeping track of place values and each incoming carry. Line up the final digits before beginning.

Align different lengths

To add 1101 and 11, put both ones bits together. The shorter number can be written 0011. All the numbers here are binary:

11012+00112=100002

The total is sixteen. A carry from the leftmost written column becomes a new digit on the left. Written as full bytes, the same sum is 00001101 plus 00000011, giving 00010000.

Work through a full byte

Add 00101101 and 00011011. Work from the ones column toward the 128 column:

Column valueDigits plus incoming carryResult bitCarry left
11 + 101
20 + 1 + 101
41 + 0 + 101
81 + 1 + 111
160 + 1 + 101
321 + 0 + 101
640 + 0 + 110
1280 + 000

The result bits were found from right to left. Put each one under its own column, then read the answer normally: 01001000.

The 8 column has three 1s. It leaves a result bit of 1 and still sends a carry onward. Treating it as two 1s would incorrectly write 0 there.

Check in decimal

Convert each starting number and the proposed result:

001011012=4510 000110112=2710 010010002=64+8=7210

The ordinary sum is 45+27=72, so the binary answer checks. Checking only the inputs would not check your written result.

For a larger example, 10110100 plus 00101101 gives 11100001. Their decimal values are 180, 45, and 225. The carries begin in the 4 column and continue through the 32 column; that column has three 1s and writes 1.

Repair a failed check

If the total does not match, compare the numbers' alignment first. Then trace each carry from right to left. A missed carry changes all the work that depends on it. Keep the final answer in binary when binary is requested; decimal is the checking tool.

A processor's circuits follow these same addition and carry rules. The rules describe the arithmetic, while the circuit design determines how the hardware performs it.

Key Takeaways

  • Line up numbers on the right; leading zeros can help.
  • A carry from the leftmost written column becomes a new leading digit.
  • Check both inputs and the binary result in decimal.
  • A column with three 1s writes 1 and carries 1.
  • Processor circuits follow the same binary addition rules.
5

Give bit patterns meaning

A string of bits needs rules before it can become useful information. The same pattern could stand for a number, a character, or a row of pixels. An agreed code tells a program which meaning to use and where each group ends. Simple codes make that idea visible. Character sets then show how the same approach lets computers store messages, including spaces, punctuation, and writing from many languages.

5.1 Encode messages and pictures with agreed rules

An encoding scheme matches bit patterns to meanings. Encoding turns information into bits. Decoding uses the scheme to turn the bits back into information.

Agree on the patterns and groups

A robot uses this two-bit direction code:

PatternDirection
00North
01East
10South
11West

The message 10 11 00 tells it to go south, west, north. The route east, east, south becomes 01 01 10. The spaces show where the two-bit groups end.

Group length matters. The stream 101100 splits into 10 11 00 as two-bit groups. Split into three-bit groups, it becomes 101 100. Those groups belong to a different code. Sender and receiver need the same meanings and the same grouping rules.

Give every choice its own pattern

The seven days of the week need seven different patterns. Two bits give only four, so they are too few. Three bits give eight, leaving one pattern spare. The 26 English letters need five bits for a simple fixed-length code, because five bits give 32 patterns.

A code may leave patterns unused. The aim is enough distinct patterns, not one bit per item. Sharing one pattern between two meanings would make decoding unclear unless another rule supplied the missing information.

Draw with bits

A pixel is one small picture element in a digital image. A black-and-white grid can use one bit per pixel. Choose 1 for black and 0 for white. A five-pixel row, 00100, then has one black pixel in the center.

Five rows—11111, 00100, 00100, 00100, 00100—draw a capital T. The grid holds five times five pixels, so its pixel data needs 25 bits. Reversing the color rule would reverse the black and white areas.

An eight-by-eight grid has 64 pixels. At one bit per pixel, that needs 64 bits, or 8 bytes. The width and height must be known so the receiver can rebuild the rows.

Bits do not label their own meaning

The byte 01000011 is the number 67 when read as a binary whole number. In ASCII text it represents “C.” Under the black-and-white rule above, it is a row of white, black, four whites, and two blacks.

The bits have not changed. The interpretation has. A file format tells a program how to read the data and which rules apply to its parts. For example, a pet record can keep an age as a number, a name as text, and a picture as pixels. A program needs to know which part it is reading.

Key Takeaways

  • An encoding scheme gives bit patterns their meanings.
  • Encoding and decoding must use the same code and grouping rules.
  • A fixed-length code needs at least one distinct pattern per choice.
  • One-bit black-and-white pixel data uses width × height bits.
  • The same bits can represent different information under different schemes.

5.2 Turn characters into numbers and bytes

A character can be a letter, digit, space, punctuation mark, or symbol. A character set gives characters numbers. An encoding stores those numbers as bit patterns.

Use ASCII for simple English text

ASCII assigns numbers from zero through 127. These 128 codes fit in seven bits. They include letters, digits, punctuation, spaces, and control codes such as a new line.

When stored one character per byte, an ASCII code has a leading 0. Some useful character numbers are:

CharactersDecimal code numbers
“A” through “Z”65–90
“a” through “z”97–122
“0” through “9”48–57
Space32

The letters run in order. Since “A” is 65, “C” is 67. Uppercase and lowercase are different characters: “A” is 65 while “a” is 97.

Encode and decode text

For “Hi,” look up the character numbers, then convert them:

  • “H” has number 72 and byte 01001000.
  • “i” has number 105 and byte 01101001.

The stored sequence is 01001000 01101001. Keep the bytes in the same order as the characters.

To decode 01000011 01000001 01010100, convert each byte into decimal. The values are 67, 65, and 84. ASCII gives “C,” “A,” and “T,” spelling “CAT.”

A digit used in text has its own character code. The character “7” is 55, stored as 00110111. The number seven is 00000111. A program must interpret typed digits as a number before doing arithmetic with that value.

Count all the characters

For text stored one ASCII character per byte, count spaces and punctuation too. “Hi there!” contains nine characters: two letters, a space, five more letters, and an exclamation point. It needs 9 bytes, or 72 bits, for the text itself.

Store writing from many languages

ASCII cannot represent most writing systems. Unicode assigns character numbers across many languages, symbols, and emoji. Its first 128 numbers match ASCII, so “A” still has number 65.

UTF-8 stores a Unicode character number using one to four bytes. “A” takes one byte, “é” takes two, “€” takes three, and “😀” takes four. A visible symbol can sometimes be built from several Unicode character numbers, so it is unsafe to assume every symbol on a screen occupies one byte.

For a UTF-8 size calculation, use the byte length of each character being stored. For plain ASCII text in UTF-8, each character still uses one byte. For other text, counting the characters alone may not tell you its byte size.

Key Takeaways

  • ASCII has 128 code values, which fit in 7 bits.
  • ASCII characters commonly occupy one byte each, with a leading 0.
  • Spaces, punctuation, and letter case affect stored text.
  • A digit character has a different code from the corresponding numeric value.
  • Unicode covers many writing systems and keeps ASCII’s first 128 values.
  • UTF-8 can need several bytes for a Unicode character number.
6

Measure files and plan storage space

Bytes measure both a short message and a large video. Larger units keep those measurements readable, but the unit letters and conversion steps matter. Learn to compare amounts in a common unit, distinguish memory from storage, and allow for different ways of counting. You can then use rough file sizes to plan a collection of photos, songs, and video against the space actually available.

6.1 Put data units in order

A bit and a byte measure different amounts of data. A bit, written b, is one binary digit. A byte, written B, is eight bits. A nibble is four bits, so two nibbles make one byte.

Name the larger units

Standard decimal prefixes grow in steps of 1,000:

UnitSymbolSize
KilobytekB1,000 bytes
MegabyteMB1,000 kB, or one million bytes
GigabyteGB1,000 MB, or one billion bytes
TerabyteTB1,000 GB, or one trillion bytes

Kilo means thousand, mega means million, giga means billion, and tera means trillion. These prefixes follow the same pattern as other decimal measurements.

A short text note may need kilobytes. A phone photo or a song often needs megabytes. A movie or large game may need gigabytes. A large drive can hold terabytes. File sizes vary, but these examples help judge whether an answer is sensible.

Capitalization matters. Eight megabits, written 8 Mb, contain the same amount as one megabyte, written 1 MB. Dropping the capital letter can change a measurement by a factor of eight.

Recognize steps of 1,024

Computers also use quantities based on powers of 2. The value 210=1,024 is close to 1,000. Some older labels and course questions therefore use 1,024 at each step between byte units.

Standard binary prefixes make the difference clear:

UnitSymbolSize
KibibyteKiB1,024 bytes
MebibyteMiB1,024 KiB
GibibyteGiB1,024 MiB
TebibyteTiB1,024 GiB

Use 1,000 for kB, MB, GB, and TB unless a question explicitly gives a 1,024 convention. A question using that convention needs the same step throughout. A drive's bytes can be reported with different numerical values when different unit sizes are used.

Memory and storage have different jobs

Memory, usually RAM, holds programs and data currently in use. It usually loses that data when power is removed. Storage, such as an SSD, keeps files when the device is off.

Both are measured in bytes. A laptop could have 16 GB of memory and 512 GB of storage. The first supports active work; the second holds saved files. More storage does not mean the laptop has the same amount of working memory.

Compare units before numbers

From smallest to largest, 900 kB, 500 MB, 3 GB, and 2 TB are in order. The largest written number, 900, labels the smallest amount. For close sizes, convert to a shared unit: 1,500 MB exceeds 1 GB because 1 GB is 1,000 MB.

Key Takeaways

  • A nibble is 4 bits, and a byte is 8 bits.
  • b means bits; B means bytes.
  • Decimal byte units grow by 1,000: kB, MB, GB, TB.
  • Binary byte units grow by 1,024: KiB, MiB, GiB, TiB.
  • RAM supports current work; storage keeps saved files.
  • Compare both the number and the unit.

6.2 Convert sizes and transfer rates

Converting a data size changes its unit, not its amount. A smaller unit needs a larger number. A larger unit needs a smaller number. This gives you a useful check before calculating.

Count each unit step

Between byte units, move along this order: bytes, kB, MB, GB, TB. Going toward smaller units multiplies by 1,000 at each step. Going toward larger units divides by 1,000.

For one step, 3 GB becomes 3,000 MB. For two steps, convert 2.5 GB to kB:

2.5×1,000=2,500 MB 2,500×1,000=2,500,000 kB

There are two steps from GB to kB. Multiplying by 1,000 only once would leave an answer in MB.

In the other direction:

4,500÷1,000=4.5 GB

So 4,500 MB is 4.5 GB. Likewise, 750 kB is 0.75 MB. A result below one is valid when the starting amount is less than one whole larger unit.

Treat the bit–byte step separately

One byte has eight bits. Multiply bytes by 8 to find bits; divide bits by 8 to find bytes.

For 4,000 bits:

4,000÷8=500 bytes

For 2 MB, first find 2,000,000 bytes. Then multiply by 8 to get 16,000,000 bits. The factor 8 belongs to the bit–byte step, not every step between larger units. Three bytes contain 24 bits, which is six nibbles.

Use the stated convention throughout

With binary units, the step is 1,024. Two GiB become 2,048 MiB. A course question may instead state a 1,024 convention while writing GB and MB. Under that stated convention, 2 GB becomes 2,048 MB and 5,120 MB becomes 5 GB.

Do not switch between 1,000 and 1,024 halfway through a calculation. Write down the step size at the start when a question supplies one.

Compare a file with free space

A file needs 1,800 MB. A drive has 2 GB free. Convert the free space to 2,000 MB, then subtract the file size. It fits, with 200 MB left.

Read a speed label

Transfer speeds are often measured in bits per second. A speed of 100 Mbps means 100 megabits per second. Dividing by 8 gives 12.5 MB per second.

At that steady data rate, a 500 MB file takes:

500÷12.5=40 seconds

The rate and file size must use matching units. Real transfers can take longer when the rate varies or extra data is sent.

Key Takeaways

  • Smaller units require a bigger number; larger units require a smaller number.
  • Count every step between byte units.
  • Multiply bytes by 8 for bits, or divide bits by 8 for bytes.
  • Keep the stated 1,000 or 1,024 convention throughout the calculation.
  • Convert file sizes and rates to matching units before comparing them.

6.3 Estimate what will fit

A file's size depends on its contents, length, quality, and compression. Similar photos can have different sizes. An estimate helps plan storage when exact sizes are not available.

Choose useful rough sizes

Simple English plain text often takes about one byte per character. A page of 3,000 such characters is about 3 kB. A phone photo might be about 4 MB. Music at a common MP3 quality uses about 1 MB per minute. HD video streaming can use up to about 3 GB per hour.

These are planning figures, not fixed sizes for every file. Plain text is generally small; video usually needs much more data. Compression reduces a file's size by representing its data with fewer bits. JPEG photos and MP3 audio use compression.

Estimate a collection

To plan storage, multiply the number of each file type by its estimated size. Convert all totals into one unit before adding.

Suppose a collection contains 200 photos, 30 four-minute songs, and two hours of HD video. Estimate photos at 4 MB each, songs at 4 MB each, and video at 3 GB per hour:

  • Photos: 200×4=800 MB.
  • Songs: 30×4=120 MB.
  • Video: 2×3=6 GB=6,000 MB.

The estimated total is 6,920 MB, or about 6.9 GB. It fits in 8 GB of free space, leaving roughly 1.1 GB. Adding 800, 120, and 6 directly would mix units and give a meaningless total.

Find an approximate file count

A phone has 16 GB free. At 4 MB per photo, first convert that space to 16,000 MB:

16,000÷4=4,000

That is about 4,000 photos. Real photo sizes vary, so leave some spare space when planning. Use the device's free space; its full advertised capacity also holds the operating system, apps, and existing files.

A plain-text book with 500,000 characters at one byte each needs about 500,000 bytes. That is 500 kB, or 0.5 MB, for its text.

Separate pixel data from the whole file

Some data sizes follow directly from the coding rule. A 100-by-100 black-and-white image at one bit per pixel contains 10,000 pixel bits:

10,000÷8=1,250 bytes=1.25 kB

That is the pixel data size. A complete image file may also store its dimensions and format details. Compression can change its size too. Keep the quantity being calculated clear: raw picture data and a saved file are not always the same size.

Key Takeaways

  • Estimate each file type, multiply by its count, and add in one unit.
  • Real file sizes depend on content, quality, length, and compression.
  • Use available free space when planning storage.
  • Divide free space by size per file to estimate how many fit.
  • Raw pixel data size can differ from the complete saved file size.

Binary, Bits and Bytes examples

6 Walkthroughs

1

From physical states to stored information

10 steps
See why two states work well and how a changing signal becomes digital data.
  1. 1
    IntroductionTwo symbols, many kinds of information

    A message, a sound recording, and a game all use patterns of bits inside a computer. Each bit has one of two values: 0 or 1.

    Follow how hardware holds those values, then how a real-world measurement, called a sample, becomes something the hardware can store. Smoothly changing analog signals must be rounded into separate digital values, so a record can lose detail. The physical signal and the information recorded from it are closely linked, but they are not identical.

  2. 2
    ExplanationA bit records a choice

    A bit is one binary digit. An agreed rule can make 0 mean “off” and 1 mean “on.” Both values carry information.

    A computer holds physical states, not tiny written digits. Transistors control electric signals in processors and memory. Other storage devices use features such as magnetized areas or trapped charge to record bit patterns.

  3. 3
    ExampleLeave room for small signal changes

    Imagine a circuit reading a voltage near 0 volts as 0 and near 3 volts as 1. A high signal weakens to 2.7 volts. It can still be recognized as high.

    Two separated states leave room for small disturbances. Ten nearby levels in the same voltage range would be harder to distinguish. This is one reason two-state hardware works reliably.

  4. 4
    ChallengeRead a zero correctly

    A door sensor uses 0 for closed and 1 for open. It records 0. Has it stored useful information? Explain.

    ---reveal---

    Yes. It has recorded that the door is closed. A zero is one of the two meaningful values, not an empty record. The agreed code tells the reader what that state means.

  5. 5
    ExplanationA changing temperature has in-between values

    Actual temperature can change continuously, passing through values between two readings. That makes it analog data.

    A digital record chooses from separate values. A display that records whole degrees might show 17 and then 18. The actual temperature can still be 17.6 °C; the digital record simply has no separate whole-degree value for it.

  6. 6
    ExampleMeasure, round, and store

    A sensor measures 17.6 °C and records the nearest whole degree. It records 18, stored as the byte 00010010.

    The sensor produces an electric signal. A converter measures it, and the rounded result becomes bits. That reading is one sample. Taking another sample later records a new moment, not every temperature between the two moments.

  7. 7
    Key InsightTwo choices control recording detail

    Taking samples more often can capture more changes over time. Using more bits per sample allows more possible recorded values, reducing the need for coarse rounding.

    Both changes create more data. Changing the sample timing and changing the number of bits per sample solve different problems: when measurements happen and how precisely each one can be recorded.

  8. 8
    ChallengeFind what the record misses

    A sensor measures every ten minutes and rounds to whole degrees. What two kinds of detail can its record miss?

    ---reveal---

    It can miss changes between the ten-minute readings. Rounding can also remove the detail between whole degrees. Taking readings more often helps with the first loss; using finer recorded values helps with the second.

  9. 9
    ChallengeAn exact copy can keep an imperfect recording

    A recorder saves one sample per second, rounded to whole values. Its file is copied correctly to another device. Does the copy restore the changes missed between samples?

    ---reveal---

    No. The copy keeps the exact stored bit pattern, including the original recording’s limits. Copy accuracy describes agreement between files. Recording accuracy describes how closely the samples capture the original signal.

  10. 10
    RecapKeep the signal and its record separate

    Two clear hardware states can hold bits reliably. Agreed rules make their patterns useful.

    For analog information, measurements and rounding create a digital record. That record can be copied exactly, even though it does not contain every detail of the original signal. During sound playback, a converter and speaker turn stored values back into a changing signal and sound waves.

2

Build binary place value and count its patterns

12 steps
Use doubling to read places, count in binary, and choose enough bits for a code.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionUse the doubling pattern
  2. 2
    ExplanationStart with one at the right
  3. 3
    AnalogyChoose labeled weights
  4. 4
    ChallengePlace a short number
  5. 5
    ExampleCount past a row of ones
  6. 6
    ChallengeTake the next count
  7. 7
    ExplanationDouble the available patterns
  8. 8
    Key InsightInclude the pattern for zero
  9. 9
    ExampleChoose the smallest code that works
  10. 10
    ChallengeAllow for a reserved code
  11. 11
    ChallengeConnect counting with capacity
  12. 12
    RecapConnect columns, counting, and capacity
3

Convert a number and check it another way

15 steps
Work through place-value and division methods without losing zeros or reversing digits.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionWrite the same amount in two bases
  2. 2
    ExampleRead the selected columns
  3. 3
    TipAlign before adding values
  4. 4
    ChallengeDecode a reading
  5. 5
    ExplanationChoose the largest value that fits
  6. 6
    ExampleBegin converting ninety-three
  7. 7
    ExampleFinish the lower four places
  8. 8
    TipA zero remainder still needs written zeros
  9. 9
    ChallengeBuild a new byte
  10. 10
    ExplanationFind one bit with each division
  11. 11
    ExampleDivide twenty-six down to three
  12. 12
    ExampleFinish and read upward
  13. 13
    ChallengeRead the remainder list
  14. 14
    ChallengeCompare two proposed answers
  15. 15
    RecapCheck the number, not just the final bit
4

Carry through a binary sum

11 steps
Apply column rules, follow a carry chain, and verify a full-byte answer.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRegroup at two
  2. 2
    ExplanationAdd zero or one
  3. 3
    ExampleThree ones need a different result bit
  4. 4
    ChallengeKeep the carry’s value
  5. 5
    TipLine up the ones
  6. 6
    ExampleStart a full-byte sum
  7. 7
    ExampleContinue until the carry ends
  8. 8
    ConnectionCheck the whole sum in decimal
  9. 9
    ChallengeHandle a new leading digit
  10. 10
    ChallengeUse the three-one rule in a longer sum
  11. 11
    RecapKeep each carry visible
5

Use a code to read messages and pictures

12 steps
Build a small encoding scheme, decode text, and separate character counts from byte counts.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionBits need an agreed meaning
  2. 2
    ExampleCreate a two-bit message code
  3. 3
    Key InsightAgree on group boundaries
  4. 4
    ChallengeEncode and decode a new route
  5. 5
    ExampleGive each pixel a bit
  6. 6
    ExplanationAssign text characters numbers
  7. 7
    ExampleEncode two letters
  8. 8
    ChallengeCount spaces and punctuation
  9. 9
    ConnectionA digit can be text or a number
  10. 10
    Key InsightUnicode text can use more bytes
  11. 11
    ChallengeCombine two kinds of data
  12. 12
    RecapRead with the matching rules
6

Convert data sizes and plan a collection

15 steps
Keep unit steps clear, compare rates with file sizes, and estimate the space a project needs.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionMatch the units before calculating
  2. 2
    ExplanationRead the letters carefully
  3. 3
    ConnectionSeparate working memory from saved files
  4. 4
    ChallengeCompare both number and unit
  5. 5
    ExampleWalk two steps toward smaller units
  6. 6
    ExampleKeep the factor of eight separate
  7. 7
    ExplanationRecognize binary unit names
  8. 8
    ChallengeUse binary steps without changing them
  9. 9
    ExampleTurn a transfer rate into matching units
  10. 10
    ExplanationChoose estimates for the file types
  11. 11
    ExampleEstimate two parts of a project
  12. 12
    ChallengePlan the remaining space
  13. 13
    ChallengeDistinguish the picture from its file
  14. 14
    ChallengeCheck both space and transfer time
  15. 15
    RecapCarry the units through every step

Binary, Bits and Bytes practice questions

50 Practice Questions in 5 sets

Set 1: Recognize bits and use binary patterns10 Practice Questions

Question 1 of 10

A closed window is recorded as 0 and an open window as 1. What does a stored 0 tell you?
  1. The window has no record.
  2. The window is closed.
  3. The window is open.
  4. The sensor has stopped working.
Show answerHide answer
Answer: B
The code assigns 0 to a closed window, so the bit records that state. A zero carries information just as a one does. Reading it as “no record” would lose the difference between a recorded closed window and a window with no reading.

Question 2 of 10

What makes a recorded measurement digital?
  1. It must travel through the internet.
  2. It must come from an electric device.
  3. It keeps every possible in-between value.
  4. It uses separate possible values.
Show answerHide answer
Answer: D
Digital measurements use separate recorded values, such as whole degrees. Analog measurements vary continuously between values. An electric device can handle an analog signal too, so being electronic does not by itself make its data digital.

Question 3 of 10

What is the place value of the third bit from the right in a binary whole number?
  1. 4
  2. 3
  3. 8
  4. 2
Show answerHide answer
Answer: A
The rightmost place is worth 1, the next is 2, and the third is 4. Each step left doubles the value. Choosing 8 counts one step too far: 8 belongs in the fourth place from the right.

Question 4 of 10

What binary number comes immediately after 1001?
  1. 1000
  2. 1011
  3. 1010
  4. 1100
Show answerHide answer
Answer: C
The ending 1 changes to 0, and the next 0 changes to 1. This gives 1010, moving from nine to ten. Writing 1011 would skip ten and give eleven because it leaves both final places set to 1.

Question 5 of 10

A club needs a distinct fixed-length binary code for each of 19 members. What is the smallest bit count that works?
  1. 4 bits
  2. 6 bits
  3. 19 bits
  4. 5 bits
Show answerHide answer
Answer: D
Four bits give 16 patterns, which cannot cover 19 members. Five bits give 32 patterns, enough with 13 unused. Four is tempting because it is close, but even a shortage of one pattern would prevent every member from having a distinct code.

Question 6 of 10

What is 01010110 in decimal?
  1. 85
  2. 86
  3. 106
  4. 43
Show answerHide answer
Answer: B
The 1s select 64, 16, 4, and 2, giving 64+16+4+2=86. Reading the places in reverse gives 106 instead. The final 0 also tells you the correct result must be even, which rules out 85.

Question 7 of 10

How is decimal 58 written as a full binary byte?
  1. 00111010
  2. 00110110
  3. 01110100
  4. 00111001
Show answerHide answer
Answer: A
Take 32, leaving 26; take 16, leaving 10; then take 8 and 2. Those values select the byte 00111010. The near miss 00110110 selects 4 instead of 8 and gives 54, so a correct number of 1s is not enough.

Question 8 of 10

A binary column has two input 1s and an incoming carry of 1. What should be written in that column, and what is carried?
  1. Write 0; carry 1.
  2. Write 1; carry 0.
  3. Write 1; carry 1.
  4. Write 0; carry 0.
Show answerHide answer
Answer: C
The three 1s total three, which is binary 11. One 1 stays in the current column and one carries left. Writing 0 and carrying 1 is the rule for two 1s, so it would lose one from this column's total.

Question 9 of 10

A display stores three 12-by-6 black-and-white images at one bit per pixel. How many bytes of raw pixel data do the three images need?
  1. 27 bytes
  2. 24 bytes
  3. 36 bytes
  4. 216 bytes
Show answerHide answer
Answer: A
Each grid needs 12×6=72 bits. Three images need 216 bits, which is 27 bytes. The value 216 bytes counts the bits as bytes and makes the amount eight times too large.

Question 10 of 10

What is the order from smallest to largest: 640 kB, 4 MB, and 2 GB?
  1. 2 GB, 4 MB, 640 kB
  2. 4 MB, 2 GB, 640 kB
  3. 4 MB, 640 kB, 2 GB
  4. 640 kB, 4 MB, 2 GB
Show answerHide answer
Answer: D
The unit matters as well as the number. The 640 kB file is less than 1 MB, and 4 MB is far less than 2 GB. Sorting only the numbers would put 640 last, even though its smaller unit makes it the smallest amount here.
Set 2: Convert values and compare data sizes10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A circuit recognizes a range of low voltages as 0 and a separate range of high voltages as 1. Why can a small voltage change leave the bit unchanged?
  1. Every voltage change is stored as a new binary digit.
  2. Any voltage drop forces a high signal to become low.
  3. The changed voltage can stay in the same recognized range.
  4. A low voltage always means the circuit holds no data.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A binary whole number ends in 0. What does that tell you about the number?
  1. It is even.
  2. It is odd.
  3. It is zero.
  4. It is a power of 2.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Repeated division of a whole number by 2 produces remainders 0, 1, 0, 0, 1, from first to last. What is its full-byte binary form?
  1. 00001001
  2. 00010001
  3. 00001010
  4. 00010010
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A sensor stores a whole-number reading as 10100011. What decimal reading does it hold?
  1. 162
  2. 163
  3. 197
  4. 103
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What is the binary sum of 00100110 and 00001101?
  1. 00101011
  2. 00110011
  3. 00110010
  4. 00100011
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

The text “Go, Jay!” is stored with one byte per ASCII character. How many text bytes are needed?
  1. 8 bytes
  2. 5 bytes
  3. 7 bytes
  4. 9 bytes
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A robot uses 00 = wait, 01 = forward, 10 = turn left, and 11 = turn right. How is “turn right, forward, wait” encoded?
  1. 10 01 00
  2. 00 01 11
  3. 11 10 00
  4. 11 01 00
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Using decimal units, how many kB are in 0.8 GB?
  1. 800 kB
  2. 80,000 kB
  3. 800,000 kB
  4. 8,000,000 kB
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A drive has 1.2 GB free. You plan to store 180 photos at 5 MB each and 40 audio clips at 6 MB each. Using decimal units and these estimates, how much space remains?
  1. 54 MB
  2. 240 MB
  3. 300 MB
  4. 60 MB
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A device stores whole-number settings from 0 through 40 and also needs a separate code for “not set.” What is the smallest fixed bit count that works?
  1. 5 bits
  2. 7 bits
  3. 6 bits
  4. 8 bits
Show answerHide answer

Save this lesson to see this answer.

Set 3: Follow carries, codes, and storage estimates10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A recorder takes the same number of samples but uses more bits for each sample. What can this change improve?
  1. The number of moments measured during each second.
  2. The guarantee that every real-world detail is preserved.
  3. The ability to store the recording without any data.
  4. The closeness of each stored value to its measured value.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A binary whole number is 10110. What happens to its value when a zero is added at the left?
  1. It doubles to 44.
  2. It stays at 22.
  3. It halves to 11.
  4. It rises to 23.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A school uses all possible 6-bit IDs except 000000, which is reserved. It needs IDs for 70 students. How many bits must each ID have after the smallest suitable increase?
  1. 7 bits
  2. 6 bits
  3. 8 bits
  4. 9 bits
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

How is decimal 146 written as a full binary byte?
  1. 10001010
  2. 01001001
  3. 10010010
  4. 10010001
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

During repeated division by 2, what does the first remainder tell you?
  1. The rightmost binary bit.
  2. The leftmost binary bit.
  3. The total number of bits.
  4. The largest binary place value.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

In the binary sum 1011 plus 0101, what result bit and outgoing carry come from the 4 column?
  1. Result bit 1; carry 0.
  2. Result bit 1; carry 1.
  3. Result bit 0; carry 1.
  4. Result bit 0; carry 0.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Two binary readings, 00111101 and 00010111, are added. What full-byte total should a decimal check confirm?
  1. 01001100
  2. 01010000
  3. 01011000
  4. 01010100
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

In UTF-8, “A” uses 1 byte, “é” uses 2, and “€” uses 3. How many bytes store the text “AéA€”?
  1. 4 bytes
  2. 7 bytes
  3. 6 bytes
  4. 8 bytes
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

What unit name means exactly 1,024 bytes?
  1. Kilobyte
  2. Kibibyte
  3. Megabyte
  4. Mebibyte
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

An image has 48 columns and 24 rows, with one bit per pixel. A collection contains 25 such images. How many bytes of raw pixel data does the collection contain?
  1. 3,600 bytes
  2. 1,152 bytes
  3. 4,800 bytes
  4. 28,800 bytes
Show answerHide answer

Save this lesson to see this answer.

Set 4: Link binary methods with real data10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What does a correctly copied digital file preserve exactly?
  1. Its complete pattern of bits.
  2. Every detail of the real scene.
  3. The original storage cells.
  4. Its total number of past views.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

Recorder P takes one 8-bit sample per minute. Recorder Q takes one 12-bit sample per second. Over ten minutes, how many times as much sample data does Q store?
  1. 60 times
  2. 40 times
  3. 90 times
  4. 1.5 times
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A binary counter shows 11110. What does it show two counts later?
  1. 11111
  2. 100001
  3. 111100
  4. 100000
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A sensor’s first reading is the whole-number byte 10101000. Its next reading is thirteen higher. What full-byte pattern stores the next reading?
  1. 10110001
  2. 10110101
  3. 10110111
  4. 10111001
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A learner writes decimal 176 as binary 1011 after selecting 128, 32, and 16. What full-byte answer keeps those selections in their correct columns?
  1. 00001011
  2. 10110000
  3. 01011000
  4. 10100001
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A binary total should be 01100000. One input is 01001011. What other input completes the addition?
  1. 00010100
  2. 00011101
  3. 00100101
  4. 00010101
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A game has 12 action codes and 5 status codes. Each needs a different fixed-length pattern in one shared codebook. How many patterns remain unused at the smallest suitable bit count?
  1. 15 patterns
  2. 1 pattern
  3. 12 patterns
  4. 16 patterns
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

ASCII gives “A” code 65, “B” code 66, and “a” code 97. What text is represented by 01100001 01000010 01000001?
  1. “aCA”
  2. “aAB”
  3. “aBA”
  4. “bBA”
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A tablet has 8 GB of RAM and 128 GB of storage. Where is a saved photo kept so it remains after the tablet is powered off?
  1. In its 8 GB of working RAM.
  2. In both, as permanent RAM.
  3. In its 128 GB of storage.
  4. In neither when offline.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A file is 180 MB. It transfers at a steady data rate of 48 Mbps. How long does the file data take to transfer?
  1. 3.75 seconds
  2. 30 seconds
  3. 24 seconds
  4. 240 seconds
Show answerHide answer

Save this lesson to see this answer.

Set 5: Solve connected binary and storage problems10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A binary whole number has 1s in the 64, 8, and 1 columns. What happens to its value if a zero is added at the right?
  1. It stays at 73.
  2. It changes from 73 to 146.
  3. It changes from 73 to 74.
  4. It changes from 73 to 36.5.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A learner divides 118 repeatedly by 2 and reads the remainders from first to last, then pads on the left to make a byte. What incorrect byte results?
  1. 01110110
  2. 11101100
  3. 00110111
  4. 00111011
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

In binary addition, the 8 column has input bits 1 and 1, with an incoming carry of 1. How much value is sent into the 16 column?
  1. 16
  2. 8
  3. 24
  4. 32
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A collector records two binary counts, 01010111 and 00101011. After combining them, 10 more items arrive. What is the new full-byte count?
  1. 10000010
  2. 10000100
  3. 01111100
  4. 10001100
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A marker stores a 5-bit ID and a 6-by-4 picture at one bit per pixel. It pads the combined data with zeros to fill whole bytes. How many padding bits are needed?
  1. 1 bit
  2. 4 bits
  3. 3 bits
  4. 5 bits
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

In UTF-8, “B” uses 1 byte, “é” uses 2, and “😀” uses 4. A label contains “Bé😀” followed by exactly two ASCII digits, with no space between. How many bits store its text?
  1. 72 bits
  2. 40 bits
  3. 56 bits
  4. 64 bits
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A computer stores a recording locally and has no internet connection. Why is the recording still digital?
  1. Its information is stored as a continuously changing signal.
  2. Its information is digital because the device is electronic.
  3. Its information turns digital only when the device is online.
  4. Its information is stored as separate encoded values.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A question defines 1 MB as 1,024 kB and 1 GB as 1,024 MB. Under that convention, how many MB are in 3.5 GB?
  1. 3,500 MB
  2. 3,584 MB
  3. 3,072 MB
  4. 4,096 MB
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A drive has 2.4 GB free. A project needs 250 photos at 6 MB each. The remaining space is for audio at 3 MB per minute. Using decimal units and these estimates, how many whole audio minutes fit?
  1. 150 minutes
  2. 500 minutes
  3. 800 minutes
  4. 300 minutes
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

An archive contains 320 files of 750 kB each. It transfers at a steady file-data rate of 16 Mbps. Using decimal units, how many seconds does the archive take to transfer?
  1. 120 seconds
  2. 15 seconds
  3. 160 seconds
  4. 960 seconds
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

68 Key Terms, each with its definition

A

Addend
An addend is a number being added; binary addends line up on the right so that equal place values share a column.
In binary 1001 plus 0011, the addends are nine and three, and their ones bits line up.
Analog data
Analog data varies continuously, with possible values between any two values, as in a changing sound pressure or temperature.
The changing air pressure reaching a microphone is an analog signal before it is digitized.
Analog-to-digital converter
An analog-to-digital converter measures an analog electric signal and turns its readings into separate digital values.
A recorder’s converter produces the digital readings that become the stored sound recording.
ASCII
ASCII is a character code with 128 values, numbered 0–127, covering basic English text and control codes.
An ASCII space has code 32 and needs storage just like a letter when a message is saved.

B

Base
The base of a place value system tells how many digits it uses and how much each column grows compared with the one on its right.
Base 2 doubles column values, while base 10 makes each column ten times the one on its right.
Binary
Binary is a way of representing information with the two symbols 0 and 1, which can be combined into longer patterns.
A robot can use the binary pattern 01 to mean “turn left” when its code defines that meaning.
Binary addition
Binary addition combines binary numbers by matching place values and carrying left whenever a column total reaches two.
Adding 0010 and 0010 produces 0100 because two twos are regrouped into one four.
Binary counting
Binary counting increases numbers using only 0 and 1, carrying to the next column when a column would reach two.
The count from 0111 to 1000 turns three ending 1s into zeros and creates a new leading 1.
Binary-to-decimal conversion
Binary-to-decimal conversion finds the base 10 value of a binary number by adding the place values selected by its 1s.
Converting 10010 means adding sixteen and two, which gives the decimal result eighteen.
Bit
A bit is one binary digit, either 0 or 1, and is the smallest unit used to measure a computer’s stored data.
A sensor can record whether a door is open using one bit, with 0 for closed and 1 for open.
Bit pattern
A bit pattern is a particular ordered group of zeros and ones; different patterns can be assigned different values or meanings.
Three bits have eight patterns, which can label seven days while leaving one pattern unused.
Bit rate
A bit rate measures how many bits are transferred per unit of time, often per second, rather than a stored file’s capacity.
A connection sending 40 megabits each second has a bit rate of 40 Mbps during that transfer.
Byte
A byte is a group of eight bits, offering 256 patterns that can represent whole numbers from zero through 255.
The byte 00001001 can store the whole-number value nine when read using binary place values.

C

Carry
A carry moves part of a column total into the next place on the left; in binary, two units become one unit of the next place.
When the ones column totals three, write 1 there and carry 1 into the twos column.
Carry chain
A carry chain occurs when an incoming carry makes another column produce a carry, continuing across several places.
Adding one to binary 1111 creates a carry chain that produces 10000 as the written result.
Character
A character is a unit of text such as a letter, digit, punctuation mark, symbol, or space, given a number by a character set.
The text “No!” has three characters, including the exclamation point, when stored as ASCII.
Character set
A character set assigns numbers to characters so they can be represented digitally and decoded back into text.
ASCII assigns uppercase “A” the number 65 and lowercase “a” the different number 97.
Code capacity
A code’s capacity is the number of distinct patterns available; a fixed group of n bits provides 2ⁿ possible patterns.
A four-bit code has capacity for sixteen different IDs, so seventeen IDs require a larger code.
Column total
A column total is the sum of the input digits and any incoming carry in one place, before writing its bit and outgoing carry.
Two input 1s plus an incoming 1 make a column total of three, which writes 1 and carries 1.
Compression
Compression reduces a file’s size by representing its contents using fewer bits; it is used by formats such as JPEG and MP3.
A compressed music file can need less storage than the raw audio data used to create it.
Control code
A control code represents a text-handling action, such as a new line, instead of a visible printed character.
Some of ASCII’s 128 codes control text layout, so not all 128 represent visible letters or symbols.
Conversion check
A conversion check tests a rewritten number by converting it back, with odd-or-even and range checks helping catch errors.
A proposed byte for decimal 70 must read back as seventy and must end in 0 because seventy is even.
Conversion factor
A conversion factor changes the unit of a measurement without changing its amount, such as eight bits for each byte.
Multiplying 12 bytes by eight bits per byte gives 96 bits representing the same amount of data.

D

Decimal
Decimal is the base 10 number system, also called denary, using digits 0–9 and columns worth powers of ten.
The whole number 407 is decimal even though it does not contain a written decimal point.
Decoding
Decoding turns encoded data back into information by applying the same meanings and group rules used to create it.
A robot decodes 01 10 as two instructions when its agreed code uses groups of two bits.
Digital data
Digital data represents information using separate values, such as recorded whole numbers, instead of a continuous range.
A thermometer display reading 18.2 °C gives a separate digital value for the measured temperature.
Digital-to-analog converter
A digital-to-analog converter turns stored digital values into a changing electric signal that equipment can use.
During playback, the converter supplies a signal that a speaker can turn into sound waves.
Digitization
Digitization is the process of measuring an analog signal, rounding measurements to recordable values, and storing them digitally.
A sound recorder digitizes a microphone signal so the recording can be stored and edited as bits.

E

Encoding
Encoding turns information into a stored or transmitted form using agreed rules, such as matching directions to bit groups.
A sender encodes three robot instructions by replacing each direction with its two-bit code.
Encoding scheme
An encoding scheme is an agreed set of rules assigning meanings to bit patterns and describing how to read their groups.
A direction scheme can define 00 as north while another scheme gives that same pattern a different meaning.
Even binary whole number
An even binary whole number ends in 0, leaving only even place values selected in its higher columns.
Binary 10100 ends in 0 and represents twenty, which can be divided evenly into two groups.
Exact digital copy
An exact digital copy is a copy with the same complete bit pattern as the original file, preserving its stored information.
Copying a photo correctly onto another drive preserves its data even though different cells hold it.

F

File format
A file format sets rules for organizing and interpreting a file’s bits, including how its different parts should be read.
A program uses an image’s format to interpret its stored dimensions and picture information.
File size
A file size measures how much data a file contains, depending on its content, length, quality, format, and compression.
Two photos with similar subjects may have different file sizes because their quality settings differ.
Flash storage
Flash storage records data using electric charge trapped in cells and keeps that data when its power is switched off.
A USB drive uses flash storage to keep a saved presentation while it is unplugged from a computer.
Free space
Free space is the unused part of a device’s storage available for new files after existing data and software occupy their share.
A tablet labeled 64 GB has less than that amount free because its system and apps already take space.

G

Gigabyte
A gigabyte, written GB, is one billion bytes or 1,000 MB, and commonly measures large files or device capacities.
A drive with 3 GB free has 3,000 MB available for additional files using decimal units.

K

Kibibyte
A kibibyte, written KiB, is a binary data unit equal to 1,024 bytes, distinct from the decimal kilobyte.
A 4 KiB data block contains 4,096 bytes because each of its kibibytes holds 1,024 bytes.
Kilobyte
A kilobyte, written kB, is a decimal data unit equal to 1,000 bytes; the prefix kilo means one thousand.
A 7 kB text file contains 7,000 bytes when its size is measured using standard decimal units.

L

Leading zero
A leading zero is a zero placed before a number’s first nonzero digit; it does not change a binary whole number’s value.
Writing binary 110 as 00000110 adds leading zeros so that the number occupies a full byte.
Least significant bit
The least significant bit is the rightmost bit, worth 1 in a binary whole number and showing whether its value is odd or even.
Changing 00101100 to 00101101 changes only the least significant bit and increases the value by one.

M

MB per second
MB per second measures a transfer rate in megabytes each second, with every byte containing eight bits.
A 90 MB file takes thirty seconds at a steady file-data rate of 3 MB per second.
Mbps
Mbps means megabits per second, a transfer-rate unit that counts millions of bits sent in each second.
At a steady 80 Mbps, dividing the bit rate by eight gives a data rate of 10 MB per second.
Megabyte
A megabyte, written MB, is one million bytes or 1,000 kB, using decimal prefixes to describe the amount of data.
A photo estimated at 5 MB contains about five million bytes under the decimal convention.
Most significant bit
The most significant bit is the leftmost bit of a binary number, occupying the largest place value in the written group.
In the full byte 10000001, the most significant bit is in the column worth 128.

N

Nibble
A nibble is a group of four bits, with sixteen possible patterns that can represent whole numbers from zero through fifteen.
Splitting an eight-bit byte into two equal groups produces two nibbles of four bits each.

O

Odd binary whole number
An odd binary whole number ends in 1 because its ones column adds an odd amount to the even values in the other columns.
The final bit of 11001 tells you its value is odd before you finish converting it to decimal.

P

Pixel
A pixel is one picture element in a digital image; a one-bit black-and-white image assigns one bit to each pixel.
A grid with twelve columns and eight rows contains ninety-six pixels, each with a recorded color.
Place value
A digit’s place value is the amount its position represents, such as 8 for a 1 in the fourth binary column from the right.
The two 1s in binary 1001 contribute different amounts: the left one gives eight and the right one gives one.
Place value table
A place value table lines up digits with their column values, helping you select the correct amounts when reading a number.
A byte table lists 128 through 1 from left to right, with the ones bit aligned at the right end.
Power of 2
A power of 2 is a value such as 2, 4, or 8 made by multiplying by 2 repeatedly; the zero power is defined as 1.
The 8 column is the third power of 2 because multiplying three 2s together gives eight.

Q

Quotient
A quotient is the answer from division; repeated-division conversion uses the whole-number quotient for its next step.
Dividing 17 by 2 gives the whole-number quotient eight and remainder one, so eight is divided next.

R

RAM
RAM is working memory holding programs and data currently in use; it usually loses its contents when power is removed.
Opening an app brings the data it is using into RAM, while its saved files remain in storage.
Raw pixel data
Raw pixel data is the picture information before file details or compression; a one-bit image needs width times height bits.
A 20-by-12 one-bit image has 240 raw pixel bits, even if its complete saved file uses a different size.
Remainder
A remainder is the whole-number amount left after division into equal groups; dividing by 2 leaves only zero or one.
When 19 is divided by 2, the remainder one supplies the rightmost bit of its binary form.
Remaining value
The remaining value is the amount still to represent after subtracting selected place values during decimal-to-binary conversion.
After selecting 64 for decimal 75, the remaining value is eleven, which still needs smaller columns.
Repeated division
Repeated division converts a decimal whole number to binary by dividing by 2 until the quotient is zero and reading remainders upward.
The first division finds the rightmost bit; the last remainder becomes the leftmost bit.
Right alignment
Right alignment places the final digits of binary addends together so their ones columns and every higher place match.
To add 1001 and 11, write the shorter addend as 0011 so it does not slip into larger columns.

S

Sample
A sample is one measurement of a signal taken during digitization, usually as part of measurements at regular intervals.
A temperature logger taking a reading every minute records sixty samples during one hour.
Set bit
A set bit is a bit whose value is 1; in a binary whole number, its column value contributes to the number’s total.
The byte 01000100 has set bits in the 64 and 4 columns, giving a total value of 68.
Storage
Storage keeps saved files when power is off, using devices such as solid-state drives, hard disks, or USB drives.
A saved school report remains in storage after the laptop has been shut down for the night.
Storage estimate
A storage estimate is a rough calculation of required space, using likely file sizes and the number of files to be saved.
Estimating twenty photos at 4 MB each gives a planned total of 80 MB before checking actual sizes.
Subtraction method
The subtraction method builds binary by taking the largest place value that fits the amount left, then checking each smaller column.
For decimal 40, select 32 and then 8, placing zeros in the other columns to make 00101000.
Sum
A sum is the total produced by addition, which can be checked by comparing its value with the values of the original addends.
The binary sum 1010 passes a decimal check when its addends are 0110 and 0100.

T

Terabyte
A terabyte, written TB, is one trillion bytes or 1,000 GB, a decimal unit often used for large storage capacities.
A 2 TB drive has a labeled capacity of two thousand gigabytes using decimal byte units.
Transistor
A transistor is a tiny electronic switch that controls electric signals in hardware such as processors and memory.
Many transistors work together inside a processor to handle the bits used by running programs.

U

Unicode
Unicode assigns character numbers across many writing systems, symbols, and emoji, with its first 128 numbers matching ASCII.
The letter “A” has number 65 in both Unicode and ASCII, allowing the two standards to agree there.
UTF-8
UTF-8 is a Unicode encoding that stores each Unicode character number using one to four bytes, depending on its value.
In UTF-8, “é” needs two bytes, so its storage is larger than a one-byte ASCII letter’s storage.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started