Jump to content

MediEvil Rolling Demo/Enemies: Difference between revisions

m
Line 12: Line 12:


(16 >> 2) * 25</pre>
(16 >> 2) * 25</pre>
In order to bitshift the decimal number '''16''' by 2, we first need to convert it into binary, which is '''10000'''. Then, we need to discard the last two digits, which will give us the binary number '''100'''. This is the binary form of the decimal number '''4'''.
In order to bitshift the decimal number '''16''' by 2, we first need to [[wikipedia:Binary number#Decimal to Binary|convert]] it into binary, which is '''10000'''. Then, we need to discard the last two digits, which will give us the binary number '''100'''. [[[[wikipedia:Binary number#Binary to Decimal|Converting]] this back to decimal gives us the number '''4'''.
<pre>4 * 25 = 100</pre>
<pre>4 * 25 = 100</pre>