Data Flashcards
Why is the binary system used?
Components inside computers have billions of transistors. Binary is used to represent the transistors inside the component. Transistors can be on or off (1 or 0).
Overflow
When the result of a binary calculation requieres more bits than are available in the computer hardware (register)
Two’s complement, denary to binary
- Remove the - sign
- Convert the number to binary
- Flip the bits
- Add 1
Two’s complement, binary to denary
- Remove 1
- Flip the bits
- Convert to denary
- Add a negative sign (if the original number started with a 1)
Logical shifts
When doubling, shift/move all bits to the left
When halving, shift/move all bits to the right
Bit
Binary digit
Image file size formula
File size(bits) = width(px) x height(px) x colour depth(bits)
Hexadecimal
- Used to avoid errors when manipulating numbers
- Represent binary numbers using smaller digits (1 hexadecimal digit = 1 nibble)
- Computers don’t process hexadecimal
- 0-F
Units
kilobit - 1000 bits
megabit - 1000^2 bits
gigabit - 1000^3 bits
kilobyte - 8 x 1000 bits
megabyte - 8 x 1000^2 bits
gigabyte - 8 x 1000^3
kibibyte - 8 x 1024 bits
mebibyte - 8 x 1024^2 bits
gibibyte - 8 x 1024^3 bits
Compression
Reduce file sizes by repackging or removing some data
Lossless compression
- Reduce file size while retaining the exact meaning of the original data.
- Works by looking for redundancy where the same data is stored many times and groups this data into one reference
Lossy compression
It reduces file size by permanently deleting some of its data.
How is text represented
Characters in texts
How are characters in text represented
- Using the ASCII table, each character has a unique bit pattern.
- Is a 7-bit code, there are 128 sequences/patterns.
How to computers record sound
With a microphone (or a recording device) a computer will take samples at a fixed interval (usually thousands of samples per second), it will then convert these values into binary to be stored in a file.