Bit Manipulation

base 10
567
567 = 5*10^2 + 6*10^1 + 7*10^0

base 2 (binary)
5
101 = 1*2^2 + 0*2^1 + 1*2^0

negative numbers are the complement of the positive one to add up to 10000000 for 8 bit

left shift = number*2 right shift = number/2

logical right shift moves the negative sign with it arithmatic right shift keeps it there