Number systems when combined with a bit size can communicate values up to a certain point. When values exceed the amount supported by the bit size, you encounter an overflow. To a computer, an overflow is a truncated value. To a person, the encoding of that truncated value can lead to disastrous circumstances.
- When the computer sets aside a specific amount of memory…to store a value,…it does so based on the number of bytes that are required.…As more and more values need to be stored,…more reservations are made in memory.…So what happens when we run out of room to store value?…We have a situation called overflow.…Let's an 8-bit value.…In this number we have eight bits to store a value.…We keep flipping the bits to add more and more…to the value that can be stored.…But then we hit a situation where we have to add…a ninth bit to the value.…
But since the amount of space reserved won't fit that,…we get an overflow.…Some overflows happen and you get an error.…Like when you take a calculator…and you try to get a number larger than the digits…that can be displayed on the screen.…But sometimes there is no error…and what you get is something weird.…What can happen is that the computer just throws away…any digits beyond eight.…So if I get a number like 255 and I add one to it,…instead of getting 256, I get zero.…
Because the last bit is just, well, thrown away.…
This course is the first in our Computer Science Principles series, designed around the AP Computer Science Principles (CSP) curriculum. It is a great foundation for anyone, at any age, to prepare for careers in technology and computer science. Lessons in this segment cover the building blocks of computing: binary logic, number systems, text and image encoding, compression, and simple communication protocols. Understanding these basics will help you understand the interplay between hardware, software, data, networks, and the people that use them.
- Binary and bits
- Digital communication
- Number systems
- Encoding text
- Compressing text and images