BINARY_TO_DECIMAL

This single page web application allows the user to click switches which each flip a single uniquely corresponding light bulb from "OFF" to "ON" and vice versa and, also, to click a BINARY_TO_DECIMAL button which computes the binary number represented by the light bulb array configuration at the time that button is clicked. Algebraic equations which are used to convert the base-two integer value represented by the array of eight light bulbs to that base-two integer's base-ten equivalent value are displayed at the bottom of this web page. (Clicking the RESET button will return this web page to its initial state such that each one of the eight light bulbs is set to "OFF" and all buttons on this web page are set to visible).

Each one of the eight light bulbs which are displayed in the table below (while that light bulb is in its "ON" state) represents two multiplied by itself N times (and N is a nonnegative integer no larger than seven which represents the unique place value of the corresponding light bulb's binary digit value).

The integer value 0 is an abstract representation of the relatively physical "OFF" (sufficiently low voltage) light bulb state.

The integer value 1 is an abstract representation of the relatively physical "ON" (sufficiently high voltage) light bulb state.

Each of the eight values of N are arranged in descending order starting with N = 7 and ending with N = 0.

The leftmost light bulb has an N value of 7 and that light bulb represents the "highest order bit" in the byte which the light bulb array represents.

highest_order_bit(ON) = 1 * (2 ^ 7) = 1 * 2 * 2 * 2 * 2 * 2 * 2 * 2 = 128.

highest_order_bit(OFF) = 0 * (2 ^ 7) = 0 * 2 * 2 * 2 * 2 * 2 * 2 * 2 = 0.

The rightmost light bulb has an N value of 0 and that light bulb represents the "lowest order bit" in the byte which the light bulb array represents.

lowest_order_bit(ON) = 1 * (2 ^ 0) = 1.

lowest_order_bit(OFF) = 0 * (2 ^ 0) = 0.

(Note that word bit is an abbreviation of the word "binary digit" and that the word byte is an abbreviation of the word "binary term" (and that a binary term is a sequence of exactly 8 binary digits)).

(Note also that a single byte can represent 256 unique patterns and that the largest base-ten value which a byte can represent is 255 and the smallest base-ten value which a byte can represent is 0).

N 7 6 5 4 3 2 1 0
light_bulb_N
bit_N 0 0 0 0 0 0 0 0
switch_N
 

???