The Binary Dark Side

Define the binary dual of a base-2 number as one of the same number of digits where all the original 0 digits are 1 and all the original 1 digits are 0. (For example, the binary dual of 10110 is 01001.)

Allowing leading zeros, what's the smallest absolute difference between an 8-digit binary number and its binary dual?


The answer is 1.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Michael Mendrin
Dec 14, 2016

Let a a and b b be 8 8 -bit binary duals. Then a + b = 255 a+b=255 by definition, and so we have a = 128 a=128 and b = 127 b=127 to have the smallest difference, which is 1 1

Nice proof that it has to be greater than 0. In case anyone is wondering, the numbers are

10000000

01111111

Alex Li - 4 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...