Под тегом ‘hex

6, Июнь 2009

(Задание 00 курса Assembly Language)
A warmup assignment

Write a C program that dynamically allocates an array of two bytes. The memory should not be initialized at first. The output should be:

1) The number of ‘ones’ in the memory allocated and the number of ‘zeros’ in the memory allocated.
2) The Hamming distance between the two bytes (the number of corresponding bits in the bytes that are are different.)
3) The bit pattern in each byte. (forwards and backwards.)
4) The value of each byte taken as an unsigned integer.
5) The hex value of the first byte as a bit pattern. (e.g. if the byte is 01111110 then the hex value is 7E)



Warning: Parameter 1 to id_generic_callback() expected to be a reference, value given in /home/users/f/freetonik/domains/css.freetonik.com/wp-content/plugins/intensedebate/intensedebate.php on line 911

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8671425 bytes) in /home/users/f/freetonik/domains/css.freetonik.com/wp-includes/functions.php on line 959