
David W. answered 05/20/19
Experienced Prof
First, list all of the given values in Binary.
0000 0000 0100 = 4
0000 0010 0000 = 32
0000 1000 0000 = 128
1000 0000 0000 = 2048
1000 1100 1100 = 2252
Now, “shift bits or other way” simply means that each bit in the number 2252 (in binary) results from some operation (e.g., shift bits) on one of the other given numbers. So, let’s group the bits in 2252 (in binary) using divisions at 4, 32, 128, and 2048:
DCCC CBBA AAxx [note that the “*” operation shifts bits LEFT]
D = 1
CCCC = 1
BB = 10 [ 2 in decimal ] [note: this is Shift Left 1 place]
AAA = 011 [ 3 in decimal ] [note: this is Shift Left 1 place then add to original]
Check:
Does (A * 4) + (B * 32) + (C * 128) + (D * 2048) = 2252 ?
(3*4) + (2*32) + (1*128) + (1*2048) = 2252 ?
2252 = 2252 ?yes
Note: This is a way to "pack" multiple small numbers into a fixed-length value (e.g., a "word" in memory). Not all computer languages offer this ability because it is machine word dependent.