Binary/octal/hexidecimal numbers Flashcards

0
Q

What are the the digits of binary?

A

0,1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What at the digits in decimal?

A

0,1,2,3,4,5,6,7,8,9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the digits of octal?

A

0,1,2,3,4,5,6,7,8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the digits of hexidecimal?

A

0,1,2,3,4,5,6,7,8,9, A(10), B(11), C(12), D(13), E(14), F(15)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a binary digit (0 or 1) usually referred to as?

A

A bit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you convert a binary number to octal?

A

Divide it into groups of 3 bits. Each group of 3 bits can be directly converted to a single octal digit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you convert an octal number to binary?

A

each octal digit is simply replaced by the equivalent 3 bit binary number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you convert a hexadecimal number to binary?

A

Each hexadecimal digit is replaced by the equivalent 4 bit binary number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you convert a binary number to hexadecimal?

A

Divide it into groups of 4 bits. Each 4 bit group corresponds to a hexadecimal digit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are the 2 ways you can convert decimal numbers to binary?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the 2 ways binary numbers can be converted into decimal numbers?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you convert decimal to either octal or hexadecimal?

A

Either first convert to binary and then to the desired system or by subtracting power or 8 or 16.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How many different systems for representing negative numbers have been used in digital computers at one time or another in history?

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the first system for representing negative numbers in computers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the second system for representing negative numbers in computers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the third system for representing a negative number with computers?

A

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.

16
Q

How is binary addition different from decimal addition?

A

It is the same except a carry is generated if the sum is greater than 1 rather than greater than 9.

17
Q

What is the fourth system for representing negative numbers with computers?

A

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.

18
Q

What are the 2 desirable properties for an encoding system?

A

1) only one representation for zero.

2) exactly as many positive numbers as negative numbers.

19
Q

How are two binary numbers added?

A

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.

20
Q

What is a group of 4 bits called?

A

A nibble.

21
Q

What is a group of 8 bits called?

A

A byte.

22
Q

What are leading zeros?

A

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.

23
Q

How do you find the complement, or NOT, of a binary value?

A

Change all the 1s to 0s and 0s to 1s, then find the value of the new binary number.

24
Q

What are the four possible OR combinations?

A

0 or 0=0
0 or 1=1
1 or 0=1
1 or 1=1

25
Q

How do you find the or of two binary numbers?

A

Line up the numbers so the bit positions match then compare each bit to the corresponding bit in the other number.

26
Q

What are the 4 possible outcomes of AND?

A

0 and 0=0
0 and 1=0
1 and 0=0
1 and 1=1

27
Q

How do you AND two binary values?

A

Line up the numbers and compare each bit to its corresponding bit in the other value.

28
Q

What is XOR?

A

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.

29
Q

What are the four possible combinations for XOR?

A

0 XOR 0=0
0 XOR 1=1
1 XOR 0=1
1 XOR 1=1