Skip to content
Cardinal Spellman High SchoolComputer Science Department
  • Study
  • Teacher tools
  • About

Cardinal Spellman High SchoolComputer Science Department

Developed by Farzin Khan Shifat

Go to the top of the page↑

Explore

  • Study
  • Teacher tools
  • Department

Need help?

  • Teacher guide
  • Request a tool
  • Report a problem

Your progress stays on this device. Vercel counts visits to public study pages, without your names, answers, files or grades. On a shared computer, use Forget my progress when you finish.

Study calculator

Drag this handle or use arrow keys to move the calculator. Home restores its position.

You can keep working on the page while this calculator is open. Closing keeps your calculations in this tab. Reloading clears them. This is Spellman’s study calculator, not a TI-84 emulator.

  1. ← All courses
  2. Computer Science
  3. Unit 5: Digital Representation and File Management

Lesson 4 of 5

Pictures, Sound and Size

How pixels and samples become bits, and how big a file gets

Lessons and study tools
PracticeKey words
  1. Unit 1: Computer Hardware
    1. What Makes a Computer?
    2. Four Jobs of a Computer
    3. Data and Information
    4. CPU, RAM, and Storage
    5. Devices and Ports
    6. Choosing Hardware
    7. Hardware Review
  2. Unit 2: Computer and Internet Basics
    1. The Five Roles
    2. The Request Trip
    3. Local, Remote, and the Cloud
    4. Unit Review
  3. Unit 5: Digital Representation and File Management
    1. Only Two Choices: Bits and Switches
    2. Counting in Binary
    3. Same Bits, Different Meaning
    4. Current lessonPictures, Sound and Size
    5. Adding in Binary
    6. Binary Review
  1. 1Learn it
  2. 2Practice it
  3. 12343Classwork
  4. 4Homework
  5. 5Finish

Step 1 of 5: Learn it

Learn it · 1 of 14Big ideas: pictures and colorsNext: Pixels to bitsChoose an activity

One idea at a time. Try the example, then keep going.

Big ideas · 1 of 14

Big ideas

Big ideas: pictures and colors

Do this: Read each idea. Then try painting with 1 bit and 2 bits per pixel.

Key words

  • Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words
  • Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words
  1. 1

    1. Pictures are grids

    A digital picture is a grid of tiny squares. Each square is a Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words, and each pixel stores its color as bits.

  2. 2

    2. One bit: black or white

    With 1 bit per Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words, each pixel is black or white: we use 0 for white and 1 for black. With 2 bits per pixel, each has 4 choices: 00, 01, 10 and 11. Photos use many more bits per pixel.

  3. 3

    3. Four color choices

    With 2 bits per Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words, each pixel can use one of 4 colors: 00, 01, 10 or 11.

Step-through

Pixels to bits

Do this: Step through the picture. Before each step, guess what the bits will look like.

Here is a small black and white picture. Watch how it turns into bits.

8 by 8 pixels0011110001000010101001011000000110100101100110010100001000111100Row bits1 black, 0 white1 pixelblack = 1000110114 colors2 bits a pixel

Whole picture, 4 steps

4 steps. Tap a number or Show me how it works.

Try it

Pixel Painter

Do this: Paint a small picture. Watch each row's bits and the size change as you work.

Tap a pixel to paint it. Each row's bits update as you paint. Then try 4 colors and compare the size. Count pixel data only.

Colors (bits per pixel)

Changing this clears your picture.

  • 0 white, empty
  • 1 black, solid

Tap, Space or Enter paints. Arrows move. Home/End: row ends. Ctrl+Home/End: canvas ends.

Your picture

Stored bits

  1. Row 100000000
  2. Row 200000000
  3. Row 300000000
  4. Row 400000000
  5. Row 500000000
  6. Row 600000000
  7. Row 700000000
  8. Row 800000000

Try a different image size

Change the size; your painting stays the same.

8 × 8 = 64 pixels

64 × 1 bit = 64 bits

64 ÷ 8 = 8 bytes

1 bit per pixel gives 2 colors.

Pixel data only: this ignores headers, padding and compression.

64 pixels × 1 bit = 64 bits = 8 bytes

Remember: Width × height × bits per pixel gives the pixel-data bit count. Divide by 8 for bytes; round up only if needed.

Tip: Switch to 4 colors and watch the size double, even though the grid did not change.

Big ideas

Big ideas: counting picture data

Do this: Read each idea. Then follow the picture-size examples.

  1. 1

    1. What we count

    Count Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words data only; ignore headers (file details), padding (extra space) and compression (ways to shrink files).

  2. 2

    2. Picture size

    For Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words data only, width × height × bits per pixel ÷ 8 gives bytes; ignore headers, padding and compression. Round the total up to whole bytes only when the bits do not divide evenly by 8.

  3. 3

    3. Whole bytes only

    Round up to a whole Key word · Unit 5ByteA group of 8 bits.Exactly: Eight bits handled together. One byte has 256 different patterns, enough for the numbers 0 to 255.Mix-up alert: A byte is 8 bits, not the other way round. A bit is the smaller one.See this in Key words only when the total bits do not divide evenly by 8. Round the total, not each row.

    8 bits01000001

Worked example: a black and white picture

Do this: Follow each step. Then work out the size of a 16 by 16 black and white picture.

An icon is 8 × 8 pixels, black and white, 1 bit per pixel. Pixel data only: ignore headers, padding and compression.

  1. Step 1: 8 × 8 × 1 = 64 bits.
  2. Step 2: 64 ÷ 8 = 8 bytes.
  3. Step 3: 64 divides evenly by 8, so no rounding.

The pixel data needs 8 bytes.

Worked example: a color picture

Do this: Follow each step. Then check the answer by working backward.

A picture is 12 × 8 pixels at 8 bits per pixel. Pixel data only: ignore headers, padding and compression.

  1. Step 1: 12 × 8 × 8 = 768 bits.
  2. Step 2: 768 ÷ 8 = 96 bytes.
  3. Step 3: 768 divides evenly by 8, so no rounding.

The pixel data needs 96 bytes.

Worked example: rounding up to whole bytes

Do this: Follow each step. Then say why we round up, not down.

A 10 × 6 black and white picture, 1 bit per pixel. Pixel data only: ignore headers, padding and compression.

  1. Step 1: 10 × 6 × 1 = 60 bits.
  2. Step 2: 60 ÷ 8 = 7.5 bytes.
  3. Step 3: 7 bytes hold only 56 bits, so round up.

So it needs 8 whole bytes.

Mix-up alert: more colors is not more pixels

Do this: Say what changes when a picture goes from 2 colors to 4.

More bits per Key word · Unit 5PixelOne tiny square of color in a digital picture.Exactly: The smallest dot in the grid that makes up a digital image. Each pixel's color is stored as one or more bits.Mix-up alert: More bits per pixel means more possible colors, not more pixels. More stored bits do not guarantee a better-looking picture.See this in Key words does not add pixels. It gives each pixel more possible colors. Keep width and height the same: changing from 1 to 2 bits per pixel doubles the pixel-data bit count. A byte total rounded up may not double exactly.

Mix-up alert: bigger is not always better

Do this: Explain why file size alone cannot tell you how good a picture looks.

A bigger picture file is not always a better picture. Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words depends on the number of pixels, the bits per pixel and format choices. More stored bits do not guarantee a better-looking picture.

Big ideas

Big ideas: sound measurements

Do this: Read each idea. Then compare the wave with its stored measurements.

  1. 1

    1. Sound is measured

    A computer measures a sound wave many times a second and stores each measurement as a number written in Key word · Unit 5BitOne 0 or 1. The SMALLEST piece of computer data.Exactly: A binary digit: a single 0 or 1. It records the state of one switch, off or on.Mix-up alert: A bit is not a byte. It takes 8 bits to make 1 byte.See this in Key words. More measurements follow the wave more closely and take more storage.

    1
  2. 2

    2. More bits per measurement

    Using more Key word · Unit 5BitOne 0 or 1. The SMALLEST piece of computer data.Exactly: A binary digit: a single 0 or 1. It records the state of one switch, off or on.Mix-up alert: A bit is not a byte. It takes 8 bits to make 1 byte.See this in Key words for each sound measurement records it more precisely and also takes more storage. This is a different change from taking more measurements.

    1

Try it

Sound in Pictures

Do this: Move the slider from few measurements to many. Say what changes.

The smooth line is a sound wave. The dots are the measurements a computer stores. With few measurements, the stored shape is rough.

Compare the smooth wave with its stored steps. No audio is played.

A sound wave with 4 measurementsThe dashed curve is the smooth wave. Dots mark measured values. A solid stepped line holds each stored value until the next measurement.
Smooth wave (dashed)Stored steps (solid)Measurements (dots)

Use the arrow keys to try 4, 8, 16, 32, 64 measurements.

4 measurements

With 4 measurements, the steps miss most of the wave's shape.

Stored values, from left to right

Measurements are rounded to whole numbers, 0 to 15.

  1. 8
  2. 11
  3. 4
  4. 8

Remember: More measurements sound closer to the real wave, but they take more bits.

Big ideas

Big ideas: storage sizes

Do this: Read each idea. Put the storage units in order from smallest to largest.

  1. 1

    1. Storage sizes

    From smallest to largest, Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words goes bit → byte → KB → MB → GB. KB means kilobyte, MB means megabyte and GB means gigabyte.

    bitbyteKBMBGB
  2. 2

    2. Bits and bytes

    A Key word · Unit 5BitOne 0 or 1. The SMALLEST piece of computer data.Exactly: A binary digit: a single 0 or 1. It records the state of one switch, off or on.Mix-up alert: A bit is not a byte. It takes 8 bits to make 1 byte.See this in Key words is one 0 or 1; a Key word · Unit 5ByteA group of 8 bits.Exactly: Eight bits handled together. One byte has 256 different patterns, enough for the numbers 0 to 255.Mix-up alert: A byte is 8 bits, not the other way round. A bit is the smaller one.See this in Key words holds 8 bits. One switch uses one bit. In our letter activities, one capital letter uses one byte.

    1
  3. 3

    3. KB, MB and GB

    In this course, 1 KB = 1,000 bytes, 1 MB = 1,000 KB and 1 GB = 1,000 MB.

  4. 4

    4. Two counting rules

    Some computers count 1,024 instead of 1,000 when showing Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words. That can make the same file show a different size.

    bitbyteKBMBGB
  5. 5

    5. A message and a text page

    Approximate Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words: a short message might use 100 bytes; a page of plain text might use a few KB; real sizes vary.

    bitbyteKBMBGB
  6. 6

    6. A photo or a song

    Approximate Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words: a phone photo or a song might use a few MB; real sizes vary.

    bitbyteKBMBGB
  7. 7

    7. A full-length HD movie

    Approximate Key word · Unit 5Storage sizeHow much space data takes up, measured in bits, bytes, KB, MB or GB.Exactly: 8 bits make 1 byte. In this course, 1 KB is 1,000 bytes, 1 MB is 1,000 KB and 1 GB is 1,000 MB. Some computers count 1,024 instead of 1,000. For picture calculations, count pixel data only: ignore headers, padding and compression. Divide the total bits by 8 and round up to whole bytes only if they do not divide evenly.Mix-up alert: A bigger file is not always a better picture. Size depends on the number of pixels, the bits per pixel and the file format.See this in Key words: a full-length HD movie might use a few GB; real sizes vary.

    bitbyteKBMBGB

Mix-up alert: 1,000 or 1,024?

Do this: Say how many bytes are in 1 KB in this course.

A size shown using 1,024 bytes per KB does not mean the file changed. In this course, 1 KB = 1,000 bytes; some computers count 1,024 instead.

From other sites

Watch and explore

Do this: Pick one to see the same ideas another way.

  • How Computers Work: Binary & Data

    Code.org, about 6 minutes

    Watch from 4:21 to 5:43

    Watch for:

    • What the video says pictures are made of
    • How a sound wave becomes a list of numbers
    • What more bits for each sound measurement gives
    Open on YouTube↗ (opens in a new tab)
  • Images, Pixels and RGB

    Code.org, about 6 minutes

    Watch from 0:44 to 4:01

    Watch for:

    • What resolution means for a picture
    • How many bits each color channel and each pixel use
    • Its photos use 24 bits per pixel; our practice uses 1, 2 or 8
    Open on YouTube↗ (opens in a new tab)

Video not loading? It might be blocked on this wifi. Try it at home.

Step 2 of 5: Practice it

What is left (7 of 7)

Ready when you are.

Activity 1 of 7 · 0 of 7 activities done

Try it

Pixel Painter challenge

Do this: Paint the picture from its rows of bits: 1 is dark, 0 is light. Then check.

Each row of bits is one row of the picture. Paint every 1 dark and leave every 0 light. What picture appears?

  • 0 white, empty
  • 1 black, solid

Tap, Space or Enter paints. Arrows move. Home/End: row ends. Ctrl+Home/End: canvas ends.

Your picture

Stored bits

  1. Row 100000000
  2. Row 200000000
  3. Row 300000000
  4. Row 400000000
  5. Row 500000000
  6. Row 600000000
  7. Row 700000000
  8. Row 800000000

Paint these bits

  1. Row 101100110
  2. Row 211111111
  3. Row 311111111
  4. Row 411111111
  5. Row 501111110
  6. Row 600111100
  7. Row 700011000
  8. Row 800000000

Try a different image size

Change the size; your painting stays the same.

8 × 8 = 64 pixels

64 × 1 bit = 64 bits

64 ÷ 8 = 8 bytes

1 bit per pixel gives 2 colors.

Pixel data only: this ignores headers, padding and compression.

64 pixels × 1 bit = 64 bits = 8 bytes

Remember: Each row of bits describes one row of pixels: 0 is white and 1 is black.

Try it

Binary Drill

Do this: Answer, check, then keep going.

Work out picture sizes and convert between bits and bytes. For pictures, count pixel data only. Show the working if you get stuck.

Streak: 0 correct in a row. This session only.

How many bits are in 14 bytes?

Write it

Explain the bigger file

Do this: Write two or three sentences, then compare with the key points.

Step 1 of 3: Write

Two pictures are both 100 pixels wide and 100 pixels tall. One is black and white at 1 bit per pixel. The other uses more bits per pixel for more possible colors. Count pixel data only. Ignore headers, padding and compression. Explain why the color picture needs more bits of pixel data.

Start here if it helps: The color picture takes more storage because...

0 words · Aim for 30 or more. This is a guide, not a limit.

Your answer is not saved anywhere. It disappears when you leave the page.

Flashcards

Pictures, sound and size cards

Do this: Work out each answer before you flip. Mark the ones you still need to learn.

Card 1 of 15

Pictures, sound and size

0 Know it0 Still learning

Zoom in on a picture.

Deck options
Keyboard help

On the card: Enter or Space flips. Left and Right move. After revealing, 1 marks Still learning and 2 marks Know it. Tab reaches every control.

Question

What is a pixel?

Answer

One tiny square of color in a digital picture.

Question

How many bits per pixel does black and white need?

Answer

1 bit per pixel: we use 0 for white and 1 for black.

Question

How many bits per pixel give 4 colors?

Answer

2 bits: 00, 01, 10 and 11.

Question

Count pixel data only. Ignore headers, padding and compression. How do you find a picture's size in bits?

Answer

Width × height × bits per pixel gives bits. Divide the total bits by 8; round up to whole bytes only if they do not divide evenly.

Question

Count pixel data only. Ignore headers, padding and compression. How do you turn a picture's total bits into whole bytes?

Answer

Divide the total bits by 8; round up to whole bytes only if they do not divide evenly.

Question

How does a computer store sound?

Answer

It measures the sound wave many times a second and stores each measurement as bits.

Question

What happens with more sound measurements?

Answer

It sounds closer to the real sound, and the file gets bigger.

Question

How many bytes are in 1 KB in this course?

Answer

1,000 bytes. Some computers count 1,024.

Question

Put in order from smallest: GB, bit, MB, byte, KB.

Answer

bit, byte, KB, MB, GB.

Question

Count pixel data only. How many bytes does an 8 by 8 picture need at 2 bits per pixel?

Answer

16 bytes: 8 × 8 × 2 = 128 bits, and 128 ÷ 8 = 16.

Question

How many bytes are in 1 MB in this course?

Answer

1,000,000 bytes: 1,000 KB, each 1,000 bytes.

Question

How many colors can 3 bits per pixel show?

Answer

8 colors.

Question

What makes a sound file bigger?

Answer

More measurements each second, more bits per measurement, or a longer recording all take more storage when the other choices stay the same.

Question

Count pixel data only. How many bits does a 4 by 4 black and white picture at 1 bit per pixel need?

Answer

16 bits, which is 2 bytes.

Question

What does rounding up to whole bytes mean?

Answer

If bits ÷ 8 is not a whole number, use the next whole number of bytes.

True or false

Size it up

Do this: Choose True or False. Work it out before you choose.

Statement 1 of 14

Using 2 bits per pixel instead of 1 adds more pixels to a picture.

Self-test

Check yourself

Do this: Answer every question. Write the multiplication on paper if it helps.

8 questions. One at a time.

Practice, not a grade. No timer. Your best score stays in this browser.

Match

Match the key words

Do this: Choose a word, then choose its meaning.

Word match round

Connect the ideas

0 / 4 connected

Choose a term, then its meaning. Or drag its grip. Use Tab and Enter or Space; Escape clears.

Terms

Meanings

Step 3 of 5: Classwork

Working on paper? Open this lesson's Classwork step and choose Paper and PDF. It gives you your own empty sheet to print.

Your work trail

  1. 1Question 1Start hereCheck your answer. Hints help you try again.
  2. 2Question 2Locked
  3. 3Question 3Locked
  4. 4Question 4Locked
  5. Your exit sentenceLockedOne thing you can do, or a question you still have.
  6. Turn in on ClassroomLockedDownload your finished work, then attach it.
Before you startQuestion 1. Show all steps
  1. 1Question 1Start hereCheck your answer. Hints help you try again.
  2. 2Question 2Locked
  3. 3Question 3Locked
  4. 4Question 4Locked
  5. Your exit sentenceLockedOne thing you can do, or a question you still have.
  6. Turn in on ClassroomLockedDownload your finished work, then attach it.

One step at a time. A hint can help you try again.

Classwork

Pictures, Sound and Size

Your next step

Started on another device?

Shared computer

How saving works

  • Your answers save in this browser on this device as you go.
  • Your sentence and your name are never saved in this browser. They stay only on this page until you close it, and in a PDF you download.
  • Your teacher sees nothing until you turn it in on Google Classroom. This site can't see Classroom.
  • Anyone using this browser can see saved answers. On a shared computer, use Forget when you finish.
  • Finished work stays until the end of the school year. Unfinished work stays for 30 days.

Step 4 of 5: Homework

Homework · 10 points

Pictures, Sound and Size homework

Opening your homework…

Working on paper? Open this lesson's Homework step and choose Paper and PDF. It gives you your own empty sheet to print.

Step 5 of 5: Finish

Ready to move on?

Practice it: You did 0 of 7 activities.

You decide when you have finished. This is your study progress, not a grade.

Not marked finished yet.

Next lesson: Adding in BinaryUnit 5: Digital Representation and File Management
TOPICDONE
Published with approval from Mr. Farzin Khan Shifat. Last updated October 27, 2026.
For teachers: post this lesson in Classroom

Two ready posts. Nothing is saved or sent. Make one Classroom assignment for each step you assign, using the points shown below and its own due date. Copy its post and paste it into the assignment's instructions.

  • 1234Classwork

    Worth 10 points.

    https://gradebridge-beryl.vercel.app/learn/csc/digital-representation-and-files/pictures-sound-and-size#classwork

  • Homework

    Worth 10 points.

    https://gradebridge-beryl.vercel.app/learn/csc/digital-representation-and-files/pictures-sound-and-size#homework

After students turn it in →, open Check student work

Download their files from the assignment's Drive folder, then open them in Check student work.