Computing - Data Flashcards
What is a bit?
One binary digit (1 or 0)
What is the difference between a nibble and a byte?
A nibble is 4 bits
A byte is 8 bits
What is a kilobyte in bytes?
1024 bytes
How do you convert decimal into binary?
Divide the number by 2 and the remainder is the furthest digit to the right
Divide that number by 2 and the remainder is the next number and so on
Convert the decimal 67 to binary
67 / 2 = 33 r 1 33 / 2 = 16 r 1 16 / 2 = 8 r 0 8 / 2 = 4 r 0 4 / 2 = 2 r 0 2 / 2 = 1 r 0 1 / 2 = 0 r 1
67 = 1000011
How do you convert binary to decimal?
Make a table with the multiples of 2 going from right to left
Put the binary number in the table with one digit in each column
Add together the multiples of 2 that have a 1 under them
Convert 11010 from binary to decimal
16 | 1 8 | 1 4 | 0 2 | 1 1 | 0 16 + 8 + 2 = 26
11010 = 26
How do you add binary numbers?
Add like a decimal but if the result is 2, carry 1 to the next column
If the result is 3 put a 1 below AND carry 1 to the next column
Add the binary numbers 1111 and 1100
1111 + 1100 1 + 0 = 1 1 + 0 = 1 1 + 1 = 0 (carry 1) 1 + 1 (+ 1) = 1 (carry 1) (1) = 1 1111 + 1100 = 11011
Why is getting 11011 when adding 1111 and 1100 a problem?
There are 5 digits in the answer and 4 digits in each of the binary numbers to be added
This is an overflow error
What is hexadecimal?
Base 16 number system
Each column is worth 16 times the one to its right
What are the digits in hexadecimal?
0 to 9 and then A to F
How do you convert hex to binary?
Change each digit to decimal
Calculate the 4 binary digits that make up each decimal number
Put the binary digit groups together
Convert DB (hex) to binary
D = 13 B = 11
13 / 2 = 6 r 1 6 / 2 = 3 r 0 3 / 2 = 1 r 1 1 / 2 = 0 r 1 13 = 1101
11 / 2 = 5 r 1 5 / 2 = 2 r 1 2 / 2 = 1 r 0 1 / 2 = 0 r 1 11 = 1011
DB = 11011011
Describe the ASCII character set
Uses 7 bits (binary digits) to store each character
This allows there to be 127 different characters