2
$\begingroup$

Can somebody please explain to me, how one can calculate W = 2762827861, 1991065600 from previous representation B? An example calculation would be great.

I am unable to figure out how the translation from the second last to the last row works.

The figure is dealing with elements of fixed size. In the first row you simply see an array of ten (n=10) elements A[i] with i=1,...,10 such that A[2] = 18, ... In the second row, the respective integers are replaced by their binary representation using 5-bit chunks (l=5). The third row, B, is just a concatenation of the second row. The fourth row partitions W into two chunks with w=32 bits each. Empty slots ($2*32 - 10*5= 14$) on the right are filled with zeros until two times 32 bits are represented.

The figure is retrieved from https://doi.org/10.1017/CBO9781316588284, Chapter 3: Arrays, p. 41.

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

The binary representation of 2762827861 is 10100 10010 10110 10110 10000 10101 01 in binary. That exactly the first 32 bit word in W. The second value is 0 1110 11010 10110 10100 00000 00000 00. I've left padded a single zero bit. So these are just the unsigned, big endian values as displayed, although the rightmost zeros are missing as you've indicated.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.