Data Rep. Flashcards
How do computing technologies represent numbers, text, images, video, and sound?
using just two symbols: 0’s and 1’s
- 0’s and 1’s are embodied as ‘high’ (on) or ‘low’ (off) signals on various electronic and optical storage media (ie. punch cards, vacuum tubes, transistors, DVDs)
What is a decimal number?
base 10
- every column is worth 10x as much as previous one
- each digit can be any value from 0-9
What is a binary number?
base 2
- every column is worth 2x as much as previous one
- each digit is 0 or 1
What is a bit?
short for binary digit – is 0 or 1
How do computers process binary numbers?
ie. when computer sees 1000000 (by something like one “on” part on DVD followed by six “off” parts on DVD), it reads this as binary and processes it as decimal 64
64 and 1000000 are two representations of same number
How are binary numbers read and written?
- say each digit when reading binary numbers
- may see letter ‘b’ to make it clear it is binary number
- may see subscript 2 after number to make it clear it is binary number
What is a hexadecimal number?
base 16
digits: 0-F
- compromise between humans and computers (humans have trouble with binary; computers don’t understand decimal)
- easy to convert between hex and binary
How can hexadecimal digits be represented?
digits can be represented perfectly by 16 symbols of 4-bit sequences
- 0000 = hex 0
- 0001 = hex 1
- 1111 = hex F
What is a hexit?
4 bits
Why is it easy to convert between hex and binary?
because each hex digit corresponds to 4-binary sequence
If you shift binary number to left by one bit, and pad empty space with zero, you are _____.
multiplying by 2
ie. 0b0010 → 0b0100 = 2 → 4
ie. 0b0100 → 0b1000 = 4 → 8
If you shift hex number to left by one bit, and pad empty space with zero, you are ___.
multiplying by 16
ie. 0x01 → 0x10 = 1 → 16
ie. 0x10 → 0x100 = 16 → 256
What are the advantages of ternary computers over binary computers?
- lower electricity consumption
- lower production cost
What is a ternary system?
base 3
What is the general rule for number systems?
take base (ie. how many single digits are allowed in particular number system) and raise it to power of however many spots you have
What does ‘mod’ mean?
determining the remainder
How do we store letters in hex?
ASCII (American Standard Code for Information Interchange)
128 values (7 bits, since 2^7 = 128)
Other than letters, what else is stored in ASCII?
punctuation, spaces, and other special control characters are encoded
What is a code point?
each encoded item in ASCII
Why does ASCII have 7 bits?
extra ‘check’ bit was included that could be used to detect certain errors that might arise (ie. when sending data over a modem)
What is extended ASCII?
uses all 8 bits
allows for characters with accents
What is unicode?
text representation standard
- with 1,112,064 code points, it covers most of world’s modern and historic writing systems
What are the different implementations of unicode?
includes UTF-8 and UTF-16, which are variable length encodings (use 1 byte (8 bits) for ASCII, but more for other characters)
(UTF = unicode transformation format)
Formatting
What does uploading a Word document into Hex editor do?
suggests that document is not in ASCII representation
How does Word store its data?
it’s actually a zipped collection of files
- if you unzip a word document, you can see these files
What format are Word documents in?
most files that comprise a Word document are in XML (extensible markup language) format
- they describe metadata such as font style and size, document creator, etc.
- files may also contain information about tracked changes to document, collaborators, privacy and security settings, and more
What are the privacy implications of Word?
information that’s encoded in Word document can have data that you don’t necessarily want to share
Can you get rid of metadata from Word documents?
there are ways to ‘scrub’ metadata from Word documents
- details depend on type of computer (Mac or PC) and on version of Word
How do monitors, phone screens, and TVs make different colours?
by mixing red, green, and blue lights
How many intensities do computer applications use?
256 intensities (8 bits) for each of red, green, and blue
What is the hex representation for black?
000000
absence of light
What is the hex representation for white?
FFFFFF
full intensity of each colour
What are the two ways that computers commonly store images?
-
What is a bitmap?
most common way computers store images
pictures is chopped up into pixels
What are pixels?
small little squares
How is each pixel’s colour stored?
in RGB
most displays divide each pixel into separate red, green, and blue subpixels
What kind of representation do we want for fixed resolution (ie. number of pixels)?
want a representation to specify a unique image, up to rescaling
What must a bitmap image representation specify?
- first byte indicates image width (or number of columns in grid of pixels, from 0 to 255)
- second byte indicates image height (or number of rows in grid of pixels, from 0 to 255)
- remaining data stores RGB colour specification of each pixel in a grid in a precise order (say from top left to bottom right)