Chap 1 - Data representation (no. systems, [text, sound, video, image], [data storage and file compression]) Flashcards
name the number systems
-binary
-hexadecimal
-Octal
-denary
note: sequence for 2 powers starts form 1
what are the bases for the number systems
-binary - 2
-hexadecimal -16
-Octal - 8
-denary- 10
numbers in Hexadecimal
0 to F
numbers in octal
0 - 7
numbers in denary
0 - 9
numbers in binary
0 - 1
what does 1 mean in binary
- ON, TRUE, HIGH
- flow of electrical signals
what does 0 mean in binary
- OFF, FALSE, LOW
- absence of flow of electrical signals
sequence for binary until 2^13
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192
what are numbers in binary called
bit
what is Least significant bit (LSB)
bit on the extreme right
what is Most significant bit (MSB)
bit on the extreme left
what is assigned to each bit
index value
what does index value start and end with
0 until MSB in denary
how do you go binary to denary
- use sequence
- multiply the 1 bit by 2 to the power of its index value. and add values
eg, 101 - 1x2^0 + 1x2^2 = 5
how do you go denary to binary
-divide number by 2 until you get 0
-track remainders and take from bottom to top
eg, 2| 12 0
2| 6 0
2| 3 1
2|1
0
9 = 1100
-bottom will be MSB
how do you go from binary to hexadecimal
-group bits into groups of 4 starting from LSB
-add 00 at MSB to complete groups
-convert each group to hexadecimal
-write the numbers starting from MSB group
eg. 0001 1010 = 1A
1 A (hexadecimal)
-MSB no. will start
how do you go binary to ocotal
-group bits into groups of 3 starting from LSB
-add 00 at MSB to complete groups
-convert each group to denary
-write the numbers starting from MSB group
eg. 001 010 = 12 - octal
1 2 (denary)
-MSB no. will start
how do you go from octal to binary
-write the binary bits for each octal digit
how do you go from hexadecimal to binary
-write the binary bits for each hex digit
the bits for hex 9 - F
hex - binary - denary
9 - 1001 |9
A - 1010 |10
B - 1011 |11
C - 1100 |12
D - 1101 |13
E - 1110 |14
F - 1111 |15
number systems conversion algorithms
Hex
|
Octal - Binary - Denary
H - B - 1 digit = 4 bits
O - B - 1 digit = 3 bits
D - B - divide by 2
B - D - sequence
why is binary used in computers
-computers are made up of logic gates
-which only have 2 states (0 or 1)
why is hex used over binary by users
-easier to read/ identify errors because it shortens binary
-takes less screen space
-less chance of making an error
5 uses of Hex
-MAC address
-IP address
-HTML colour codes
-Error code / memory dump
-ASCII
what does MAC address stand for
Media Access Control
what is error codes
locate error
what does Ox and Ob mean in error codes
Ox - hex
Ob - binary
What is HTML colour codes
Hypertext Markup Language colour codes
-represent colour on screen
-diff. values = diff. colours
-intensity of colour depends on Hex value
-primary colours: RGB - Red, Green, Blue
eg. # FF FF FF - white
# 00 00 00 - black
what is ASCII
American Standard Code for Information Interchange
-unique 7 bit values for characters on standard keyboard
-base 256, 0 - 255
Unicode
-support all languages
-up to 4 byte per character
-overlaps first 128 character with ASCII
-Extended ASCII
-1 byte (8 bits) for non-English characters
how do you add or subtract binary
two’s complement
rules for two’s complement
- 0 + 0 = 0
- 0 + 1 = 1
- 1+ 0 = 1
- 1 + 1 = 10 (move 1 to other side)
- 1+ 1 + 1 = 11
note: when asked to find 2’s complement of a number, just do 2’s complement - find the other value
what does each binary value have
a positive and negative number
how to find two’s complement of a number
-find the first 1 from the LSB and flip the bits beyond it
how to convert two complement bit (negative bit) into denary
-find value of first 1 from MSB & make it negative
-add negative no. with the values of the other 1 bits
eg. 10100011 is a two’s complement integer
-128 + (1+2+32) = -93
what does you call when there is an extra number when doing two’s complement addition
carry
eg. 10100 + 10001 = 100101
| this 1 is overflow