1.2.4 Data Storage Flashcards
(41 cards)
How to convert binary to decimal?
Convert 1001101 to decimal
64 32 16 8 4 2 1
1 0 0 1 1 0 1
64+8+4+1=75
How to convert decimal to binary?
Convert 37 binary
32 16 8 4 2 1
1 0 0 1 0 1
100101
How to convert Binary to Hexadecimal?
Convert 10101110 to hexadecimal
8421 8421
1010 1110
10 14
A E
AE
How to convert Hexadecimal to Binary?
Convert 7F to binary
8421 8421
0111 1111
01111111
How to convert Decimal to Hexadecimal?
Convert 237 to hexadecimal?
128 64 32 16 8 4 2 1
1 1 1 0 1 1 0 1
8421 8421
1110 1101
E D
ED
How to convert Decimal to Hexadecimal?
Convert 1024 to hexadecimal
1024 512 256 128 64 32 16 8 4 2 1
0 1 0 0 0 0 0 0 0 0 0 0
8421 8421 8421
0100 0000 0000
400
How to convert Hexadecimal to Decimal?
Convert DE to decimal
8421 8421
1101 1110
128 64 32 16 8 4 2 1
1 1 0 1 1 1 1 0
222
Convert 4B to binary then to decimal
8421 8421
0100 1011
128 64 32 16 8 4 2 1
0 1 0 0 1 0 1 1
75
What are Binary Addition rules?
0+0=0
1+0=1
1+1=0 carry 1
1+1+1=1 carry 1
1110
+0111
———-
(1) 0101
/overflow
What is Binary Shift?
Shows multiplication and division of binary numbers
0001
Shift 1 to the left x2
0001 = 5
0010 = 10
00011
Shift left twice x4
00011 = 3
01100 = 12
000011
Shift left 3 times x8
000011 = 3
011000 = 24
00110101
Shift left 4 times x16
00110101
1/1 01010000
00010100
Shift right once /2
00010100 = 20
000001010 no 0 = 10
00010100
Shift right twice /4
00010100 = 20
00000101 = 5
00000101
Shift to the right once
00000101
00000010.1
If you lose one you do a right shift.
5-2=2 lost accuracy with the number
lose 1 = lost accuracy of the number
What is a character set?
- A character set is a table that matches together a character to a binary value
- Character sets are necessary as they allow computers to exchange data and allow humans to input characters using a keyboard
What is an example of a character set?
A = 01000001 = 65
B = 01000010 = 66
C = 01000011 = 67
What is ASCII?
- American Standard Code for Information Interchange is a common character set which doesn’t take up too much memory
- It is important to understand that the number of characters available are limited by the number of bits available
- ASCII uses 8 bits (1 byte) per character meaning there are only 256 possible characters to use
- Only inclusive for english language - became outdated in the 1970s
What is unicode?
- Unicode is a more popular character set as it uses 16/32/64 bits per character
- Unicode-16 means that 16 bits are used per character meaning there are 65536 possible characters
What does this mean we can include in unicode with 65536 possible characters?
- Different languages
- Symbols
- Emojis
How do you calculate the size of a text file?
The file size of a text file is calculated as shown:
bits per character x number of characters
A small text file uses the ASCII character set (8 bits per character). There are 300 characters in the file. Calculate the size of the file (answer normally in kilobyts)
8 x 300 = 2400 bits
/8 = 300 bytes
/1000 = 0.3KB