So we want to play with numbers we want useful formulas now and then so lets start this.
we have one dimension
0
is a zero one number only one in size, lets call this dimension x
0,1,2,3
x is now of length 4 so x < 4 =" 9." 4 =" 2" x =" number" 1="4" 1 =" 6" 4=" 1" 4 =" 9" x =" Floor(number/(4*3))%4" y =" Floor(Floor(number/(4*3))/4)" z =" Floor(number/(4*3))" position =" position" position =" position" p =" 0" 0 =" 1" 1 =" 1">>0 = 1
1 is the bit in position 0
p = 1
1<<1 2 =" 0">>1 = 0
0 is the bit in position 1
P = 2
1 <<2 4 =" 4">>2 = 1
1 is the bit in position 2
just so you know the bitwise operators are close together with the tables of truth but they operate at a bit level, so think of every number as a bunch of truths and false
Tuesday, March 25, 2008
Basic formulas for array movement and data storage
Subscribe to:
Post Comments (Atom)


























No comments:
Post a Comment