Chapter 2 - Representing and Manipulating Information Flashcards
What is a byte?
The smallest unit of addressable memory.
What base does hexadecimal use?
Base 16.
Why is it useful to write bit patterns with hexadecimal rather than binary or decimal?
Binary can be too “verbose” and decimal makes it difficult to convert to and from bit patterns.
If a binary number does not contain a multiple of 4 bits, how should the bits be grouped?
From right to left so that the leftmost group is the smallest.
What is the hexadecimal equivalent of the following binary number?
11 1100 1010 1101 1011 0011
11 1100 1010 1101 1011 0011
3 C A D B 3
i.e. 0x3CADB3.
What is the bit pattern associated with the hexadecimal representation 0x25B9D2?
0x25B9D2 has bit pattern:
0010 0101 1011 1001 1101 0010
What is the hexadecimal representation for the binary pattern 1010 1110 0100 1001?
1010 1110 0100 1001 has hex representation 0xAE49.
If a number has the form x=2^N, how many zeros will it contain in its bit pattern after the leading 1?
N zeros.
How can a number of the form x=2^N be easily written straight into hex?
By determining i and j such that N=i+4j. There will be j zeros after the nonzero hex character and i determines the nonzero hex character (which is given by 2^i).
For example, 2^11 has N=3+4*2, and 2^3=8, so 2^11=0x800.
Do the numbers below match?
N (decimal): 5
2^N (hex): 0x20.
Yes.
N=5=i+4j=1+4*1 (and 2^1=2), so 2^N in hex is 0x20.
Do the numbers below match?
N (decimal): 23
2^N (hex): 0x400000.
No.
N=23=i+4j=3+4*5 (and 2^3=8), so 2^N in hex is 0x800000.
Do the numbers below match?
N (decimal): 15
2^N (hex): 0x8000.
Yes.
N=15=i+4j=3+4*3 (and 2^3=8), so 2^N in hex is 0x8000.
Do the numbers below match?
N (decimal): 12
2^N (hex): 0x1000.
Yes.
N=12=i+4j=0+4*3 (and 2^0=1), so 2^N in hex is 0x1000.
Do the numbers below match?
Binary: 1001 1110
Hex: 0x9E
Yes.
Do the numbers below match?
Binary: 1001 0001
Hex: 0x91
Yes.
Do the numbers below match?
Binary: 1010 1110
Hex: 0xAE
Yes.
Do the numbers below match?
Binary: 0111 0101
Hex: 0x73
No.
Is the following correct?
0x605C + 0x5 = 0x606A
No. 0x605C + 0x5 = 0x6061.
Is the following correct?
0x605C + 32 = 0x607C
Yes. 0x605C + 0x20 = 0x607C.
What is the result of the expression?
0x60FA - 0x605C = ???
0x60FA - 0x605C = 0x9D.
What important system parameter indicates the nominal size of pointer data?
The word size.
What is the size of the virtual address space of a machine with a w-bit word size?
The machine can access address 0 to 2^w-1 so there are 2^w addressable bytes.
What is the virtual address space limit of a machine with a 32-bit word size?
4GB.
True or false? 64-bit machines can run 32-bit programs.
True.