HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Computer Science
  2. /Computer Systems
  3. /Data Representation

Data Representation

Computer Science · High School (9–10) · 4 courses, 30 worked problems, 30 practice questions

A computer stores everything in binary, as patterns of 0s and 1s. A denary number can be converted to binary, or to hexadecimal, which is a short way to write binary. Binary numbers can be added, shifted left or right, and written as negative numbers with two's complement. Text is stored with a character set such as ASCII or Unicode. A sound is sampled many times each second, and an image is stored as pixels, each with a colour code. File size depends on the resolution and the colour depth, and compression makes files smaller.

With practice you will be able to

  • Convert numbers between binary, denary and hexadecimal
  • Find the file size of an image or a sound recording
  • Add two binary numbers and spot an overflow

On the syllabus of

  • IGCSE

Lessons

  • Storage, the Cloud and Network HardwareWhy do your files survive when the power goes off? How can a program need more than the RAM?High School (9–10)
  • Binary, Denary and HexadecimalWhy do computers count with only 0 and 1? Why does a colour code like 2E8B57 have letters?High School (9–10)
  • Text, Sound and Images in BinaryWhy can Unicode show far more characters than ASCII? Why does better sound make a bigger file?High School (9–10)
  • Storage Units and CompressionWhy does a kibibyte hold 1024 bytes, not 1000? How can a file shrink and lose nothing?High School (9–10)

Practice questions

Choose an answer, then check it. Each one shows a full explanation.

A thermostat stores the room setting as the 8-bit binary number 01100011. What is this in denary?

A delivery drone records its height as 166 metres in one byte. Which 8-bit pattern does it store?

An error message on a screen gives the code 5C in hexadecimal. What is the code in denary?

A programmer must write the 10-bit binary value 1011010111 in hexadecimal. Which is correct?

Worked problems

Each one has a hint, the key idea and a full worked solution.

  • A games console keeps the number of lives a player has left in one 8-bit register…Easy
  • A school scoreboard shows each score with eight lamps in a row…Medium
  • A car park barrier counts the cars that pass through it in one year, in a 16-bit register…Hard
  • A web designer picks a green colour with the code 2E8B57…Easy

Python labs

  • Write your own binary converter
  • An 8-bit register: overflow, shifts and negatives
  • Character codes in Python
  • Sizes of sound and image files
  • A file-size calculator
  • Run-length encoding

Related topics

  • Computer Systems
  • Data Transmission
  • Encryption and Cyber Security
  • Computer Hardware
  • Software, Languages and Translators
  • The Internet, the Web and Digital Currency
  • Automated and Emerging Technologies

A shop till keeps two totals, 01101110 and 00101011, and adds them in one 8-bit register. Which 8 bits does the register hold after the sum?

Each pair of numbers below is added in an 8-bit register. Which addition causes an overflow?

The diagram shows an 8-bit register. It holds 11100100 and is given a logical right shift of 2 places. Which pattern does it hold afterwards?

A bank account balance of −110-110−110 is stored as an 8-bit two's complement number. Which pattern is stored?

A robot stores its position on a track as an 8-bit two's complement number. The register holds 11001011. What is the position in denary?

A program multiplies by 4 with a logical left shift of 2 places. The 8-bit register holds 01100110, which is 102 in denary. Which statement about the result is true?

All 30 practice questions on Data Representation →

A programmer is looking for a fault. One memory location holds the 16 bits 0110111110100011…
Medium
  • A network card has the address 00-1F-A7-3C-90-D2…Hard
  • A weather station adds two rainfall readings stored in 8 bits: 01001011 and 00110110…Easy
  • A ticket machine adds the number of tickets sold in the morning, 10101010, to the number sold in…Medium
  • A small processor has no instruction to multiply…Medium
  • A freezer stores its temperature in degrees Celsius as an 8-bit two's complement number…Hard
  • A student knows only one ASCII code: the capital letter A is 65…Easy
  • A phone message is 160 characters long, spaces included…Medium
  • All 30 worked problems on Data Representation →