Answers for "what is bitshifting"

0

what is bitshifting

Reason BIT shifting: Fewer calculation for the CPU than conventional math.

Lets say you have the byte 0000 0011 	//3 in decimal
You shift it to the left.. What happens?
You get 0000 0110 						//6 in decimal 
Now you got a binairy number that is twice the ammount.
Do it again. Just do it.
0000 1100 								//12 in decimal
Again.. twice the ammount. 

Now. Lets shift to the right. What happens?
//Happy coding
Posted by: Guest on January-31-2022

Browse Popular Code Answers by Language