Flashcards in Binary/octal/hexidecimal numbers Deck (30):
What at the digits in decimal?
What are the the digits of binary?
What are the digits of octal?
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?
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?
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.
What is the third system for representing a negative number with computers?
Two's compliment. Also has a sign bit that is 0 for plus and 1 for minus. Negating a number is a two-step process. First, each 1 is replaced by a 0 and each 0 by a 1, just as in ones compliment. Second, 1 is added to he result. If a carry occurs from the leftmost bit it is thrown away.
How is binary addition different from decimal addition?
It is the same except a carry is generated if the sum is greater than 1 rather than greater than 9.
What is the fourth system for representing negative numbers with computers?
For m-bit numbers is called excess 2^m-1, represents a number by storing it as the sum of itself and 2^m-1. For example for 8 bit numbers m=8, the system is called excess 128 and tr number is stored as it's true value +128. Therefore -3 becomes -3+128=125, and -3 is represented by the 8-bit binary number for 125 (011111101). The numbers from -128 to 127 map onto 0-255. All of which are expressively as an 8 bit positive integer.
What are the 2 desirable properties for an encoding system?
1) only one representation for zero.
2) exactly as many positive numbers as negative numbers.
How are two binary numbers added?
Start at the rightmost bit and add the corresponding bits in the addend and augend. If a carry is generated it is carried one position to the left. In ones compliment a carry to the leftmost end is added to the rightmost bit. In twos compliment a carry in the leftmost bit is thrown away.
What is a group of 4 bits called?
What is a group of 8 bits called?
What are leading zeros?
One or more 0s added to the left most significant 1 bit in a number. It can turn a bit into a byte when it otherwise would not be 8 digits long.
How do you find the complement, or NOT, of a binary value?
Change all the 1s to 0s and 0s to 1s, then find the value of the new binary number.
What are the four possible OR combinations?
0 or 0=0
0 or 1=1
1 or 0=1
1 or 1=1
How do you find the or of two binary numbers?
Line up the numbers so the bit positions match then compare each bit to the corresponding bit in the other number.
What are the 4 possible outcomes of AND?
0 and 0=0
0 and 1=0
1 and 0=0
1 and 1=1
How do you AND two binary values?
Line up the numbers and compare each bit to its corresponding bit in the other value.
What is XOR?
Exclusive or. Is the same as a regular or but will only produce a 1 If either one or the other number has a 1. Not both.