Binary/octal/hexidecimal numbers Flashcards
What are the the digits of binary?
0,1
What at the digits in decimal?
0,1,2,3,4,5,6,7,8,9
What are the digits of octal?
0,1,2,3,4,5,6,7,8
What are the digits of hexidecimal?
0,1,2,3,4,5,6,7,8,9, A(10), B(11), C(12), D(13), E(14), F(15)
What is a binary digit (0 or 1) usually referred to as?
A bit.
How do you convert a binary number to octal?
Divide it into groups of 3 bits. Each group of 3 bits can be directly converted to a single octal digit.
How do you convert an octal number to binary?
each octal digit is simply replaced by the equivalent 3 bit binary number.
How do you convert a hexadecimal number to binary?
Each hexadecimal digit is replaced by the equivalent 4 bit binary number
How do you convert a binary number to hexadecimal?
Divide it into groups of 4 bits. Each 4 bit group corresponds to a hexadecimal digit
what are the 2 ways you can convert decimal numbers to binary?
1) the largest power of 2 smaller than the number is subtracted from the number. The process is then repeated on the difference. Once the number had been decomposed into powers of 2, the binary number can be assembled with 1s in the bit positions corresponding to the powers of 2, and 0s elsewhere.
2) the other method (for integers only) consists of dividing the number by 2. The quotient is written directly beneath the original number and the remainder, 0 or 1, is written next to the quotient. The quotient is then considered and the process is repeated until 0 has been reached. The result of the process will be two columns, quotients and remainders. The binary number can be read directly from the remainder column starting at the bottom.
What are the 2 ways binary numbers can be converted into decimal numbers?
1) summing up the powers of 2 corresponding to the 1 bits in the number.
2) the binary number is written vertically, one bit per line, with the leftmost bit on the bottom. The bottom line is called line 1. The entry on line n consists of two times the entry on line n-1 plus the bit on line n(either 1 or 0). The entry on the top line is the answer.
How do you convert decimal to either octal or hexadecimal?
Either first convert to binary and then to the desired system or by subtracting power or 8 or 16.
How many different systems for representing negative numbers have been used in digital computers at one time or another in history?
4
What is the first system for representing negative numbers in computers?
Signed magnitude. In this system the leftmost bit is the sign bit (0 is + and 1 is -) and the remaining bits hold the absolute magnitude of the number.
What is the second system for representing negative numbers in computers?
One’s compliment. Also has a sign bit with 0 used for plus and 1 used for minus. To negate a number, replace each 1 with a 0 and 0 with a 1. This holds for the sign bit as well. Ones compliment is obsolete.