Mapa mental
REVISION
Conteúdo do mapa
REVISION
binary Arithmatic
- There are three binary arithmetic procedures we need to know: Add two binary numbers together, Left shift a binary number, Right shift a binary number. We also need to be able to explain: Overflow errors
- Overflow errors
- An overflow error occurs when a number is too big to fit in 8-bits. Overflows can occur when we add binary numbers, or when we left shift (multiply by 2) 8 bits can store a maximum number of 255, so any operation that results in a number bigger than 255 will overflow.
- Underflow errors
- Underflow is the opposite of overflow – it occurs when a number is too small to store If we right shift 00000001, the number becomes 0, and all information has been lost For example If we right shift, then left shift (divide by 2 then multiply by 2), we would expect to get back to the same number. With overflow, the right shift rounds it down to zero, so left shifting does nothing.
- Right shift
- With a Right Shift, we move all the bits to the right, inserting a 0 in the most significant bit:
- Left shift
- Shift operations are very simple, but very useful. With a Left Shift, we move all the bits to the left, inserting a 0 in the least significant bit
Informações
- Descrição
- Mapa Mental sobre REVISION, criado por Kieran Mcfaden em 28-11-2022.
- Criado por
- Kieran Mcfaden
- Visualizações
- 1
- Avaliação