⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’

Excalidraw Data

Text Elements

Convert 256 Base 10 to Binary

T = -1

T = 0

T = 1

T = 4

0

Formula for one digit is number%2 Push the remainder in stack store the quotient in the same variable again

256%2=0 Push 0 Var = 256/2=128

128%2=0 Push 0 Var = 128/2=64

64%2=0 Push 0 Var 64/2=32

32%2=0; Push 0 Var 32/2=16

16%2=0

Push 0

Var 16/2=8

8%2=0

Push 0

Var = 8/2=4

4%2=0

Push 0

Var = 4/2=2

2%2=0

Push 0

Var = 2/2=1

1%2=1

Push 1

Var = 1/2=0 (Stop here, as Var = 0)

0

0

0

0

0

0

0

1

T = 9

T = -1

T = 0

T = 1

T = 4

0

0

0

0

0

0

0

0

1

T = 9

Result Stack. Pop the top one by one and then stick it in an array or a number Result will be 100000000