Ones complement representations of integers are used to


Question: Show that a positive integer is divisible by 3 if and only if the difference of the sum of its binary digits in evennumbered positions and the sum of its binary digits in odd-numbered positions is divisible by 3.

One's complement representations of integers are used to simplify computer arithmetic. To represent positive and negative integers with absolute value less than 2n-1, a total of n bits is used. The leftmost bit is used to represent the sign. A 0 bit in this position is used for positive integers, and a 1 bit in this position is used for negative integers. For positive integers, the remaining bits are identical to the binary expansion of the integer. For negative integers, the remaining bits are obtained by first finding the binary expansion of the absolute value of the integer, and then taking the complement of each of these bits, where the complement of a 1 is a 0 and the complement of a 0 is a 134.

Solution Preview :

Prepared by a verified Expert
Mathematics: Ones complement representations of integers are used to
Reference No:- TGS02365644

Now Priced at $10 (50% Discount)

Recommended (92%)

Rated (4.4/5)