NUMBER SYSTEMS Flashcards
What is a radix?
The base of the number system
Explain the prefixes kilo, mega, giga and tera as pertains bits
2^10 = K (kilo),
2^20 = M (mega),
2^30 =G (giga),
2^40 = T (tera).
Explain kilobytes, megabytes, gigabytes and terabytes
1 kilobyte (KB) - 1,024 bytes
1 megabyte (MB)- 1,048,576 bytes
1 gigabyte (GB)- 1,073,741,824 bytes
1 terabyte (TB)- 1,099,511,627,776 bytes
What are the ways in which signed binary integers may be expressed
Signed magnitude
One’s complement
Two’s complement
Describe the signed magnitude way of expressing signed integers. What are its problems?
Left most bit (MSB) is sign bit
0 means positive
1 means negative
Need to consider both sign and magnitude in arithmetic- Signed magnitude representation is easy for people to understand, but it requires complicated computer hardware.
Two representations of zero (+0 and -0)
Overflows are discarded
What is a minuend and subtrahend
X-Y
X-minuend
Y-subtrahend
Describe the one’s complement way of expressing signed integers. What are its problems?
Basically just flipping the bits
For example, using 8-bit one’s complement representation:
+ 3 is: 00000011
- 3 is: 11111100
Negative values are indicated by a 1 in the high order bit.
*Carry bit is added to the sum.
*If there is no carry the number is negative
Problems-Two representations of zero (+0 and -0)
Describe the one’s complement way of expressing signed integers.
If the number is positive, just convert it to binary and you’re done.
If the number is negative, find the one’s complement of the number and then add 1.
+2 = 00000010
+1 = 00000001
+0 = 00000000
-1 = 11111111
-2 = 11111110
Do the following operations using both one’s and two’s complement: 12-8 and 8-12
*Do the math babe
Describe Binary-Coded Decimal Code
Each group of 4 bits represents one decimal digit.
(185)10 = (0001 1000 0101)BCD = (10111001)2
0- 0000
1- 0001
2- 0010
3- 0011
4- 0100
5- 0101
6- 0110
7- 0111
8- 1000
9- 1001
Describe BCD Addition
If the sum is not less than 9 and the carry is not 0 add 6(0110)
*See notes for example
Describe Gray Code
Also known as Reflected Binary Code (RBC)
2 successive values differ in only 1 bit
Used to reduce the switching operation of machines
Explain the conversion to and from gray code and binary
- See notes
What is ASCII in full?
American Standard Code for Information Interchange (ASCII)
What is an alphanumeric character set?
a set of elements that includes the 10 decimal digits, the 26 letters of the alphabet, and a number of special characters.