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 →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer 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. Problems
  2. /A freezer stores its temperature in degrees Celsius as an 8-bit two's complement number…
HardComputer ScienceHigh School (9–10)Computer Science › Data RepresentationNumericalConceptualIGCSE

A freezer stores its temperature in degrees Celsius as an 8-bit two's complement number…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A freezer stores its temperature in degrees Celsius as an 8-bit two's complement number.

  1. Write −45 ∘C-45\ ^\circ\text{C}−45 ∘C as an 8-bit two's complement number.
  1. The display reads the pattern 10011101. What temperature is that?
  1. What is the lowest temperature the freezer can store?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Add binary in columns from the right: 1+1=101 + 1 = 101+1=10 (write 0, carry 1) and 1+1+1=111 + 1 + 1 = 111+1+1=11 (write 1, carry 1). An 8-bit register holds 0 to 255, so a total above 255 is an overflow. A logical shift of kkk places left multiplies by 2k2^k2k, and right divides by 2k2^k2k; bits shifted off the end are lost and 0s come in. In 8-bit two's complement the MSB is worth −128-128−128.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Given. 8-bit two's complement, with the MSB worth −128-128−128.

Step 1. +45+45+45 in binary. 45=32+8+4+145 = 32 + 8 + 4 + 145=32+8+4+1, so it is 00101101.

Step 2. Flip and add 1. Flipping gives 11010010. Adding 1 gives 11010011.

Step 3. Check (a). −128+64+16+2+1=−45-128 + 64 + 16 + 2 + 1 = -45−128+64+16+2+1=−45.

Step 4. Read 10011101. −128+16+8+4+1=−99-128 + 16 + 8 + 4 + 1 = -99−128+16+8+4+1=−99. So the temperature is −99 ∘C-99\ ^\circ\text{C}−99 ∘C.

Step 5. The lowest value. Only the MSB set: 10000000 is −128-128−128. So the lowest temperature is −128 ∘C-128\ ^\circ\text{C}−128 ∘C.

Answer: (a) 11010011. (b) −99 ∘C-99\ ^\circ\text{C}−99 ∘C. (c) −128 ∘C-128\ ^\circ\text{C}−128 ∘C.

Log in to save this for later
← All Problems
← A small processor has no instruction to multiply…A student knows only one ASCII code: the capital letter A is 65… →
More onComputer Science › Data Representation

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A student must compress two files. File A is a text file holding the 7 characters ABCDEFG, one byte…Hard
  2. A line of an icon is stored with run-length encoding as these pairs of (count, colour code): (5…Medium
  3. One row of a scanned page is 13 pixels: 6 white, then 3 black, then 4 white…Easy
  4. An image is 800 pixels wide and 600 pixels high…Hard
  5. A camera takes photos of 2048 by 1536 pixels with a colour depth of 24 bits…Medium
All problems on this topic →