Data Representation Worksheet Generator

Character codes, file sizes, hex colors and compression ratios. No AI, no credits.

Grades 6 – 12No account needed

Character codes (taken from the programming language's own character tables, not typed from memory), image, sound and text file sizes, color hex codes and compression ratios. Every answer is computed by code. No AI, so it never uses a generation credit.

What students practice

  • Computer Science
  • Data representation
  • Character codes

Live sample sheet

No account needed to view and print.
Name: ____________________Date: ____________

Data Representation

1. What character has ASCII code 91?
2. A text file contains 8,540 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
3. An uncompressed bitmap image is 1319×271 pixels with 16 bits per pixel. What is its file size?
4. Convert the RGB color (R=69, G=159, B=221) to a hex color code.
5. What is the ASCII code for the character 'O'?
6. A text file contains 8,833 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
7. An uncompressed bitmap image is 1457×401 pixels with 8 bits per pixel. What is its file size?
8. Convert the RGB color (R=128, G=175, B=156) to a hex color code.
9. What is the ASCII code for the character '\'?
10. A text file contains 8,390 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Made with TeachSpark

Answer Key — Data Representation

1. What character has ASCII code 91?
Solution:
ASCII code: 91
Character (from JavaScript String.fromCharCode): '['
Answer: '['
2. A text file contains 8,540 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Solution:
8,540 characters × 1 byte/character = 8,540 bytes
8,540 bytes ÷ 1024 = 8.34 KiB
Answer: 8.34 KiB
3. An uncompressed bitmap image is 1319×271 pixels with 16 bits per pixel. What is its file size?
Solution:
1319 × 271 = 357449 pixels
357449 pixels × 16 bits/pixel = 5,719,184 bits
5,719,184 bits ÷ 8 = 714,898 bytes
714,898 bytes ÷ 1024 = 698.14 KiB
Answer: 698.14 KiB
4. Convert the RGB color (R=69, G=159, B=221) to a hex color code.
Solution:
R=69 → 45
G=159 → 9F
B=221 → DD
Hex: #459FDD
Answer: #459FDD
5. What is the ASCII code for the character 'O'?
Solution:
Character: 'O'
ASCII code (from JavaScript charCodeAt): 79
Answer: 79
6. A text file contains 8,833 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Solution:
8,833 characters × 1 byte/character = 8,833 bytes
8,833 bytes ÷ 1024 = 8.63 KiB
Answer: 8.63 KiB
7. An uncompressed bitmap image is 1457×401 pixels with 8 bits per pixel. What is its file size?
Solution:
1457 × 401 = 584257 pixels
584257 pixels × 8 bits/pixel = 4,674,056 bits
4,674,056 bits ÷ 8 = 584,257 bytes
584,257 bytes ÷ 1024 = 570.56 KiB
Answer: 570.56 KiB
8. Convert the RGB color (R=128, G=175, B=156) to a hex color code.
Solution:
R=128 → 80
G=175 → AF
B=156 → 9C
Hex: #80AF9C
Answer: #80AF9C
9. What is the ASCII code for the character '\'?
Solution:
Character: '\'
ASCII code (from JavaScript charCodeAt): 92
Answer: 92
10. A text file contains 8,390 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Solution:
8,390 characters × 1 byte/character = 8,390 bytes
8,390 bytes ÷ 1024 = 8.19 KiB
Answer: 8.19 KiB
Answers computed by code. No AI, no credits.

Assumptions and Conventions

Assumptions:
  • ASCII characters use 1 byte (8 bits) each. Printable range: 32–126.
  • Uncompressed bitmap file size = width × height × bits per pixel ÷ 8.
  • Uncompressed audio file size = sample rate × duration × bits per sample × channels ÷ 8.
  • Hex color: #RRGGBB, where each component is 2 hex digits (00–FF).
  • Binary prefixes: 1 KiB = 1024 bytes, 1 MiB = 1,048,576 bytes.
Conventions:
  • File sizes use binary prefixes (KiB, MiB) unless stated otherwise.
  • Compression ratio = original size ÷ compressed size.
Made with TeachSpark

No account needed.

Frequently asked questions

Do students need an account to use the Data Representation?

No. Students never need an account. They open a shared link or join with a code.

Can I print the Data Representation without signing up?

Yes. This tool computes answers by code, so you can generate, preview and print worksheet without an account. A free account adds saving and student links.

How are the answers computed?

Every answer is computed by code and verified by a second independent method. No AI is used.

What grades is the Data Representation for?

This tool fits Grades 6 – 12.

✓ No account needed to generate, preview and print. A free account adds saving and student links.

Sign in

What can I do?

Without an account

  • Generate sheets
  • Preview pages
  • Print or save as PDF
  • Make versions A, B, C
  • Make differentiated levels
  • Print answer keys
  • See the trust panel and Show the calculation
  • Try the on-screen practice
  • Report a problem

With a free account

  • Save to My library
  • Browse My library
  • Share revocable student links
  • Make QR codes
  • Turn sharing on or off

Students never need an account — they open a shared link or join with a code.

Sample output, computed by code — change the options and Generate to make your own
Name: ____________________Date: ____________

Data Representation

1. What character has ASCII code 82?
2. A text file contains 4,894 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
3. An uncompressed bitmap image is 1589×599 pixels with 16 bits per pixel. What is its file size?
4. Convert the RGB color (R=18, G=196, B=255) to a hex color code.
5. What character has ASCII code 91?
6. A text file contains 9,464 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
7. An uncompressed bitmap image is 1721×1050 pixels with 16 bits per pixel. What is its file size?
8. Convert the RGB color (R=63, G=121, B=78) to a hex color code.
9. What character has ASCII code 115?
10. A text file contains 6,500 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Made with TeachSpark

Answer Key — Data Representation

1. What character has ASCII code 82?
Solution:
ASCII code: 82
Character (from JavaScript String.fromCharCode): 'R'
Answer: 'R'
2. A text file contains 4,894 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Solution:
4,894 characters × 1 byte/character = 4,894 bytes
4,894 bytes ÷ 1024 = 4.78 KiB
Answer: 4.78 KiB
3. An uncompressed bitmap image is 1589×599 pixels with 16 bits per pixel. What is its file size?
Solution:
1589 × 599 = 951811 pixels
951811 pixels × 16 bits/pixel = 15,228,976 bits
15,228,976 bits ÷ 8 = 1,903,622 bytes
1,903,622 bytes ÷ 1,048,576 = 1.82 MiB
Answer: 1.82 MiB
4. Convert the RGB color (R=18, G=196, B=255) to a hex color code.
Solution:
R=18 → 12
G=196 → C4
B=255 → FF
Hex: #12C4FF
Answer: #12C4FF
5. What character has ASCII code 91?
Solution:
ASCII code: 91
Character (from JavaScript String.fromCharCode): '['
Answer: '['
6. A text file contains 9,464 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Solution:
9,464 characters × 1 byte/character = 9,464 bytes
9,464 bytes ÷ 1024 = 9.24 KiB
Answer: 9.24 KiB
7. An uncompressed bitmap image is 1721×1050 pixels with 16 bits per pixel. What is its file size?
Solution:
1721 × 1050 = 1807050 pixels
1807050 pixels × 16 bits/pixel = 28,912,800 bits
28,912,800 bits ÷ 8 = 3,614,100 bytes
3,614,100 bytes ÷ 1,048,576 = 3.45 MiB
Answer: 3.45 MiB
8. Convert the RGB color (R=63, G=121, B=78) to a hex color code.
Solution:
R=63 → 3F
G=121 → 79
B=78 → 4E
Hex: #3F794E
Answer: #3F794E
9. What character has ASCII code 115?
Solution:
ASCII code: 115
Character (from JavaScript String.fromCharCode): 's'
Answer: 's'
10. A text file contains 6,500 ASCII characters. What is its file size? (Assume 1 byte per character, no metadata.)
Solution:
6,500 characters × 1 byte/character = 6,500 bytes
6,500 bytes ÷ 1024 = 6.35 KiB
Answer: 6.35 KiB
Answers computed by code. No AI, no credits.

Assumptions and Conventions

Assumptions:
  • ASCII characters use 1 byte (8 bits) each. Printable range: 32–126.
  • Uncompressed bitmap file size = width × height × bits per pixel ÷ 8.
  • Uncompressed audio file size = sample rate × duration × bits per sample × channels ÷ 8.
  • Hex color: #RRGGBB, where each component is 2 hex digits (00–FF).
  • Binary prefixes: 1 KiB = 1024 bytes, 1 MiB = 1,048,576 bytes.
Conventions:
  • File sizes use binary prefixes (KiB, MiB) unless stated otherwise.
  • Compression ratio = original size ÷ compressed size.
Made with TeachSpark

Data Representation - High school CS - Mixed data representation

Character codes, text, image, and sound file sizes, hex colors, and compression ratios. No AI, no credits.

Options

TeachSpark uses cookies and local storage to improve your experience and process payments securely. Learn More