I also have a shorter suggestion :
[My Logic-blocks v2 r1.1] : Different Block-Block Interactions
http://starmadedock.net/threads/my-logic-blocks-v2-r1-1-different-block-block-interactions.3425/
http://starmadedock.net/threads/my-logic-blocks-v2-r1-1-different-block-block-interactions.3425/
Read more : http://scitation.aip.org/content/aip/journal/jap/114/23/10.1063/1.4852995Nonvolatile “AND said:Electronic devices or circuits that can implement both logic and memory functions are regarded as the building blocks for future massive parallel computing beyond von Neumann architecture. Here we proposed phase-change memory (PCM)-based nonvolatile logic gates capable of AND, OR, and NOT Boolean logic operations verified in SPICE simulations and circuit experiments. The logic operations are parallel computing and results can be stored directly in the states of the logic gates, facilitating the combination of computing and memory in the same circuit. These results are encouraging for ultralow-power and high-speed nonvolatile logic circuit design based on novel memory devices.
Read more : http://arstechnica.com/science/2014...ts-a-single-bit-act-as-different-logic-gates/Phase change materials can switch between two forms depending on how quickly they're cooled. Cool them quickly and you get an amorphous form, which provides significant resistance to the flow of electrons. Cool them slowly and they will allow electrons to flow more readily. Once cooled, these two forms remain stable, locking the differences in conduction in place.
This difference has been exploited to create a type of storage called phase change memory that's as fast as standard RAM but retains its contents between power cycles. So far, phase change memory hasn't been a commercial success. But some researchers are now experimenting with the idea of building processors out of the technology.
The efforts started out with a simple arrangement of resistors and phase change bits that operated like a logic gate, allowing AND, OR, and NOT operations. But a new paper shows that by carefully controlling how the phase change bits are set in the first place, it's possible to have a single bit perform different logic operations, acting as a NOT, NOR, or NAND gate. Regardless of the operation's output, it's stored even if power is shut down.
How works in StarMade?
Keep links during bit-flip
Keep output, except the block is forced to change it dependent on inputs.
Only flip last 4 ID-bits (some blocks (like hull) may allow ID-flip thus I included a block for this here)
Flippers.
Flippers should change their value dependent on from which they received input:
Keep output, except the block is forced to change it dependent on inputs.
Only flip last 4 ID-bits (some blocks (like hull) may allow ID-flip thus I included a block for this here)
Flippers.
Flippers should change their value dependent on from which they received input:
- output = last received input
- output = Button
- output = from OR | own output
- output = from AND & own output
- flipped value( orientation or id ) =
- // Java : bitwise^XOR, bitwise&AND, bitwise|OR
- flipper = flipperOrientation & flipable // only flip bits which are allowed to be flipped
- value = (value & flipper) | (flipper & flipperInput*1111b)
Now imagine an element that flips a linked or nearby Block's ID between …0b <> …1b => (Not X) <> X
- NAND <> AND
- NOR <> OR
- NXOR <> XOR (output 0 if 0<value<N || output 1 if 0<value<N)
- NButton(=NOT) <> Button (=Activation Module)
- ODD-parity <> Even-parity (1,3,5,... || 0,2,4 )
- Orientation <> ID Flipper
- NExclusive <> PExclusive (true if sum(positve inputs) == inputs-1 || true if sum(positive inputs) == 1 )
- Not repeating <> Repeating Delay
- NAND <> NOR || AND <> OR
- NXOR <> NButton || XOR <> Button
- ODD-Parity <> Orientation-Flipper || Even-parity <> ID-Flipper
- NExclusive <> Not repeating Delay || Exclusive <> Repeating Delay
- NAND <> NXOR || AND <> XOR
- NOR <> NButton || OR <> Button
- ODD-Parity <> NExclusive || EVEN-Parity <> Exclusive
- Orientation-Flipper <> Not repating Delay || ID-Flipper <> Repeating Delay
- NAND <> ODD-Parity || AND <> EVEN-Parity
- NOR <> Orientation-Flipper || OR <> ID-Flipper
- NXOR <> NExclusive || XOR <> Exclusive
- NButton <> NotRepeating Delay || Button <> Repeating Delay
4 ID bits allow 16 different blocks. I took time to sort it for us:
(sorted to makes most sense after flipping, (0=not, 1=normal), first simple -> later advanced):
0000 -00- NAND
0001 -01- AND
0010 -02- NOR
0011 -03- OR
0100 -04- NXOR (all or none inputs)
0101 -05- XOR (not all, not none inputs)
0110 -06- NButton (copies inverted output of last changed input) == Not
0111 -07- Button (copies output of last changed input) == Activation Module
1000 -08- Odd-Parity
1001 -09- Even-Parity
1010 -10- Orientation-Flipper
1011 -11- ID-Flipper
1000 -12- NExclusive (all but one input)
1001 -13- Exclusive (only one input)
1110 -14- NDelay - None Repeating
1111 -15- Delay
2 IDs {0 = orientation, 1 = ID}0001 -01- AND
0010 -02- NOR
0011 -03- OR
0100 -04- NXOR (all or none inputs)
0101 -05- XOR (not all, not none inputs)
0110 -06- NButton (copies inverted output of last changed input) == Not
0111 -07- Button (copies output of last changed input) == Activation Module
1000 -08- Odd-Parity
1001 -09- Even-Parity
1010 -10- Orientation-Flipper
1011 -11- ID-Flipper
1000 -12- NExclusive (all but one input)
1001 -13- Exclusive (only one input)
1110 -14- NDelay - None Repeating
1111 -15- Delay
Flippers themselves can have any combination of 4 Orientations-Bits {0001, 0010, 0100, 1000} which affects how they flip values.
JavaScript:
local MASK = 11''1111''1110b // first for orientation-based
local FLIPPER = (id of some inverter) &MASK // calculated at compile time -not runtime-, replaces occurances
if ( <inverter id> &MASK == FLIPPER ){ // check if it is a Flipper
if ( <inverter id> &(1b) == 1 ) <affectedBlock id> = affect( <affectedBlock id>, <affectedBlock flipables>, <flipper orientation>, <flipper active> )
else <affectedBlock orientation> = affect( <affectedBlock orientation>, <affectedBlock flipables>, <flipper orientation>, <flipper active> )
}
// else it is not an inverter
// flipable : 1111b == ALL
int affect( int value, int flipables, int flipperOrientation, boolean flipperActive ){
flipper &= flipables
value &= ~flipper
flipper &= flipperActive // true evaluates to 1111''1111b[/INDENT]
value |= flipper
}
Inverter only work on blocks which allow this
permissions are stored as fast-calculating bitmasks in the block definition (= once per block type)
Use cases:- Change Light color between Red, Green, Blue, White
- Change Light colour between Black, Orange, Yellow, Purple/Pink
- change between 0..3 and 4..7 light colors with a third-bit Inverter
- Change Logic Behaviour
- add+sub with less blocks
- RAM FlipFlops with less blocks
- Adds a challenge for advanced builders because it is mindblowing and few can use it beyond 95% of it's full potential.
- ... to be continued ...
- Change Gravity direction
- ... to be continued ...
Changing Colours : First-Block's ID +
0. R - 4. Orange
1. G - 5. Yellow
2. B - 6. Purple
3. W - 7. Black
1. G - 5. Yellow
2. B - 6. Purple
3. W - 7. Black
Last edited: