Data Representation
Define the term binary.
A language that a computer can understand is made up of “0” and “1”
ON and OFF, 0 turns off, 1 turns on, and a computer uses switches and electricity to
turn it on
The binary is base 2 because there are only 2 numbers
English is too complex for the computer so it converts it to binary
Denary is in base 10 because it has 10 numbers, 0-9, which gives you 10 digits
2 types of translators:
Compiler
Interpreter
- The interpreter executes one after the other
- The compiler will scan the code if there are no errors and execute them
simultaneously.
Advantages of the compiler:
- less time-consuming and more time efficient
The disadvantage of the compiler:
- https://docs.google.com/document/d/1AaZT6e1yhdGVk1xFCtxjAQk_62vi6VPNV-
Qr_O6_G8I/editit's less accurate.
Advantages of the interpreter:
- more accurate
Disadvantages of the interpreter:
- takes its less time efficient
5th September
- Binary goes from the highest weight to the lowest weight
- Denary has its values on the right, the maximum number you represent is 9
8-bit binary digits - multiply by 2, because it base 2 since it's only got 2 numbers
,VISUAL METHOD:
- Write out your 8-bit binary numbers
1,2,,4,8,16,32,64,128
- What is the biggest number that is closest to the number you are trying to
represent
- Turn on the digit you are going to use
- Subtract to find the number the remaining numbers that you need to represent
- Repeat step 3+4
BASE 2 METHOD
- If it is a whole number from the division, no decimal, then it is going to be “0”
- If its a decimal you round it up to “1”
QUESTIONS:
no. 128 64 32 16 8 4 2 1
56 0 0 1 1 1 0 0 0
67 0 1 0 0 0 0 1 1
121 0 1 1 1 1 0 0 1
220 1 1 0 1 1 1 0 0
223 1 1 0 1 1 1 1 1
1. 128+32+8+4+1 = 173
2. 128+64+32+16+4 = 244
3. 128+32+16+8+4+2+1 = 191
4. 128+8+4+2 = 142
5. 128+32+16+8+2+1 = 187
Analogue data = a continuous stream of data that is processed by humans.
Hexadecimal is a 16-base, so it includes 0-9 and then the letters A-F
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
A B C D E F
,What is half a bit:
4 bits is referred as a nibble
And 8 bits is referred as a byte
Converting from deanery to hexadecimal:
- Convert to its binary form
- Split the 8-bit binary into half
- Convert that into its hexadecimal form using its hexadecimal system
QUESTIONS:
128 64 32 16 8 4 2 1
57 0 0 1 1 1 0 0 1
8 4 2 1 8 4 2 1
3 9
128 64 32 16 8 4 2 1
111 0 1 1 0 1 1 1 1
8 4 2 1 8 4 2 1
6 F
128 64 32 16 8 4 2 1
139 1 0 0 0 1 0 1 1
8 4 2 1 8 4 2 1
8 B
, 128 64 32 16 8 4 2 1
250 1 1 1 1 1 0 1 0
8 4 2 1 8 4 2 1
F A
128 64 32 16 8 4 2 1
222 1 1 0 1 1 1 1 0
8 4 2 1 8 4 2 1
D E
128 64 32 16 8 4 2 1
1A 0 0 0 1 1 0 1 0
8 4 2 1 8 4 2 1
ANS: 1 10
26
128 64 32 16 8 4 2 1
FC 1 1 1 1 1 1 0 0
8 4 2 1 8 4 2 1
ANS:
252
Define the term binary.
A language that a computer can understand is made up of “0” and “1”
ON and OFF, 0 turns off, 1 turns on, and a computer uses switches and electricity to
turn it on
The binary is base 2 because there are only 2 numbers
English is too complex for the computer so it converts it to binary
Denary is in base 10 because it has 10 numbers, 0-9, which gives you 10 digits
2 types of translators:
Compiler
Interpreter
- The interpreter executes one after the other
- The compiler will scan the code if there are no errors and execute them
simultaneously.
Advantages of the compiler:
- less time-consuming and more time efficient
The disadvantage of the compiler:
- https://docs.google.com/document/d/1AaZT6e1yhdGVk1xFCtxjAQk_62vi6VPNV-
Qr_O6_G8I/editit's less accurate.
Advantages of the interpreter:
- more accurate
Disadvantages of the interpreter:
- takes its less time efficient
5th September
- Binary goes from the highest weight to the lowest weight
- Denary has its values on the right, the maximum number you represent is 9
8-bit binary digits - multiply by 2, because it base 2 since it's only got 2 numbers
,VISUAL METHOD:
- Write out your 8-bit binary numbers
1,2,,4,8,16,32,64,128
- What is the biggest number that is closest to the number you are trying to
represent
- Turn on the digit you are going to use
- Subtract to find the number the remaining numbers that you need to represent
- Repeat step 3+4
BASE 2 METHOD
- If it is a whole number from the division, no decimal, then it is going to be “0”
- If its a decimal you round it up to “1”
QUESTIONS:
no. 128 64 32 16 8 4 2 1
56 0 0 1 1 1 0 0 0
67 0 1 0 0 0 0 1 1
121 0 1 1 1 1 0 0 1
220 1 1 0 1 1 1 0 0
223 1 1 0 1 1 1 1 1
1. 128+32+8+4+1 = 173
2. 128+64+32+16+4 = 244
3. 128+32+16+8+4+2+1 = 191
4. 128+8+4+2 = 142
5. 128+32+16+8+2+1 = 187
Analogue data = a continuous stream of data that is processed by humans.
Hexadecimal is a 16-base, so it includes 0-9 and then the letters A-F
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
A B C D E F
,What is half a bit:
4 bits is referred as a nibble
And 8 bits is referred as a byte
Converting from deanery to hexadecimal:
- Convert to its binary form
- Split the 8-bit binary into half
- Convert that into its hexadecimal form using its hexadecimal system
QUESTIONS:
128 64 32 16 8 4 2 1
57 0 0 1 1 1 0 0 1
8 4 2 1 8 4 2 1
3 9
128 64 32 16 8 4 2 1
111 0 1 1 0 1 1 1 1
8 4 2 1 8 4 2 1
6 F
128 64 32 16 8 4 2 1
139 1 0 0 0 1 0 1 1
8 4 2 1 8 4 2 1
8 B
, 128 64 32 16 8 4 2 1
250 1 1 1 1 1 0 1 0
8 4 2 1 8 4 2 1
F A
128 64 32 16 8 4 2 1
222 1 1 0 1 1 1 1 0
8 4 2 1 8 4 2 1
D E
128 64 32 16 8 4 2 1
1A 0 0 0 1 1 0 1 0
8 4 2 1 8 4 2 1
ANS: 1 10
26
128 64 32 16 8 4 2 1
FC 1 1 1 1 1 1 0 0
8 4 2 1 8 4 2 1
ANS:
252