Feb 26, 2019 21:18:41

FT9 Bit Magic

9th Feynman Technique post is about Bit Magic. First of all, what is 'bit'? We also use 'bit' to indicate very small amount like 'a little bit' or even more directly 'a bit.' But originally I assume this is coming from computer science.

Bit

Bit is a smallest unit of information. Usually it indicates if the information exists or the information does not exists. To indicate the two status of information existence, we decided to use a number: 0 and 1. Zero (0) means nothing. One (1) means there is something.

Now when it is a sequence of information, we can also express such a sequence using a sequence of zero or one e.g., 01110.

Binary

Now we saw the expression of a sequence of bit e.g., 01110. This expression is called binary. For each digit, there exists only 0 or 1. In our daily life, we only use decimal, which is another expression of information and uses from 0 to 9, in total 10 different numbers.

Bit Magic

Bit magic or bitwise algorithm means the problem is solved by taking an advantage of bit characteristics. One of the simplest example is to judege whether the number is odd or even number. If it is odd, the last digit is always odd. If it is even, the last digit is always even. So even if hundreds thousands of a sequence of bits, we only need the last digit to determine if this number is odd or even number.

contact: email - twitter / Terms / Privacy