Chapter 9 - Binary Representations Flashcards
Why was ASCII invented?
All companies before ASCII sent data using different codes
What is a character set?
A list of binary codes that can be recognised by computers as being useable characters
How to convert between character to its ASCII code in python?
Print(ord(‘d’)
How to convert between ASCII to character in python
Print(chr(67))
How many bits was the original ASCII character set?
7-bit or 2**7
How many bits was the extended ASCII character set?
8-bit or 2**8
Why was UNICODE invented?
Different companies created different extended ASCII charcetr sets and 256 codes (2**8) wasn’t enough
What is UNICODE
A character set incorporating ASCII, extended ASCII and, with 4 bytes per code, enough for 2**32 = 4.3 billion characters
What does a digital camera do with a snapshot?
breaks it down into pixels (picture elements)
What is the formula for the total number of pixels
total number of pixels = width x height
What does the higher resolution of a camera do?
Makes the image clearer
What is each pixels colour encoded into binary dependant on?
the colour depth
What is colour depth?
The number of bits used to encode the amount of Red, Green and Blue in a pixels colour
What is a common colour depth?
3 bytes ( 1 for red, 1 for green and 1 for blue)
What is the total number of shades a particular colour depth can represent?
2**number of bits