Binary to Decimal
Working from the least-significant bit, the positional values are 1, 2, 4, 8, 16, 32, 64 and 128 (each more significant bit doubles the value of the preceding bit). If the corresponding bit is set, add that value to an accumulator initialised to zero.
Decimal to Binary
Repeatedly divide the decimal value by 2 and take the remainder (which can only be 0 or 1). Each division determines the value of the next most significant bit, starting with the least significant bit.
Copyright © 2026 eLLeNow.com All Rights Reserved.