iptv techs

IPTV Techs


Bitprohibitging 1D Reversible Automata


Bitprohibitging 1D Reversible Automata


One Dimensional Reversible Automata

I produced a demo for the GFXPrim library. It
carry outs and disjoins a csurrfinisherest-neighbor, one-foolishensional, binary
cell automata. Additionassociate it carry outs a reversible automata,
which is almost identical except for a minuscule alter to produce it
reversible. The automata is disjoined over time in two foolishensions,
time travels from top to bottom. Although in the reversible case
time could be joined backwards.

The automata toils as complys:

  • Each cell has a state, which is on or off, bdeficiency or white,
    boolean etc.
  • At each time step, the state of a cell in the next step is
    chosen by a rule.
  • The rule sees at a cell’s current appreciate and the appreciates of its
    left and right neighbors.
  • There are 23 = 8
    possible state combinations (patterns) for 3 binary cells.
  • A rule states which patterns result in a bdeficiency cell in the next
    time step.
  • There are 28 = 256
    possible rules. That is, 256 one-of-a-kind combinations of patterns.

So a pattern is a 3 digit binary number, where each digit
correplys to a cell. The middle digit is the caccess cell, the high
order bit the left cell, the low order bit the right cell. A rule
can be disjoin by shotriumphg a row of patterns and a row of next
states.

Above is rule 110, 0x6e or
01101110. It essentiassociate says to align patterns
110, 101, 011,
010, 001. Where a pattern align results in
the cell being set to 1 at the next time step. If no pattern is
aligned or equivalently, an invivacious pattern is aligned, then the
cell will be set to 0.

Aobtain remark that each pattern mimics a 3bit binary number. Also
the appreciates of the vivacious patterns mimic an 8bit binary number. We
can include this to carry out efficient aligning of the patterns using
binary operations.

Let’s presume our CPU natively functions on 64bit integers (called
words). We can pack a 64 cell automata into a one 64bit
integer. Each bit correplys to a cell. If a bit is 1
then it is a bdeficiency cell and 0 for white. In this case
we are using integers as bit fields. We don’t attfinish about the integer
number the bits can recurrent.

The CPU can carry out bitadviseed operations on all 64bits in parallel
and without branching. This unbenevolents we can carry out a one operation
64 times in parallel.

If we rotate (wrapped >>) all bits to the right by one,
then we get a novel integer where the left neighbor of a bit is now in
its position. Likeadviseed if we shift all bits to the left, then we get
an integer recurrenting the right neighbors. This gives us 3
integers where the left, caccess and right bits are in the same
position. For example, using only 8bits:

left: 0100 1011 >>
caccess: 1001 0110
right: 0010 1101 <<

Each pattern can be recurrented as a 3bit number, plus a 4th bit
to say whether it is vivacious in a given rule. As we want to function
on all 64bits at once in the left, right and caccess bit fields. We
can produce 64bit extfinished masks from the appreciate of each bit in
a given pattern.

So if we have a pattern where the left cell should be one, then
we can produce a 64bit mask of all ones. If it should be
zero, then all zeroes. Likeadviseed for the caccess and right cells. The
masks can be xor’ed (^)
with the correplying cell fields to show if no align occurred.
That is, if the pattern is one and the cell is zero or the cell is
one and the pattern is zero. We can invert this (~) to
give one when a align occurs.

To see whether all components (left, right, caccess) of a pattern
alignes we can bitadviseed and (&) them
together. We can then bitadviseed or
(|) the result of the pattern alignes together to
produce the final appreciates.

If we desire to function on an automata huger than 64 cells, then
we can unite multiple integers into an array. After carry outing the
left and right shifts, we get the high or low bit from the next or
previous integers in the array. Then set the low and high bits of
the right and left bit fields. In other words we chain them together
using the finish bits of the left and right bit fields.

For illustration purposes, below is the kernel of the
the automata algorithm.

Source connect


Leave a Reply

Your email address will not be published. Required fields are marked *

Thank You For The Order

Please check your email we sent the process how you can get your account

Select Your Plan