## Simple 3-combinator memory cell - handles bursts+negatives

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art , computers.
SafwatHalaby
Burner Inserter
Posts: 5
Joined: Thu May 10, 2018 8:42 am
Contact:

### Simple 3-combinator memory cell - handles bursts+negatives

I wanted a simple memory cell which is capable of storing an arbitrary number.

The one I found at the Wiki has two problems: 1. it does not support negative values. 2. it fails when the input is a 1-tick long burst and starts to flicker wildly.

The following is an improvement which solves both problems.

Description:
• The output M (memory) is the last non-zero input I (Input).
• A non zero R (reset) signal sets the output to zero.
• 1-tick bursts of R or I are handled properly.
• Negatives are handled properly.
Blueprint:
blueprint
Image:
A 3-combinator memory cell capable of handling negatives and 1-tick bursts.
Memory_cell_with_negatives.png (451.98 KiB) Viewed 10463 times
Explanation:

During an input, combinator 1 resets combinator 3's memory. combinator 2 temporarily takes charge and handles the output as long as the input is held. Once the input is zeroed, the reset signal is zeroed as well and combinator 3 becomes again in charge of the output and combinator 2 deactivates. Here's a tick-by-tick explanation:

Tick 1:
Combinator 1 receives a non-zero input I.

Tick 2:
combinator 2 sends a reset signal.

Tick 3:
Combinator 3 resets and is now sending nothing.
Simultaneously, to prevent an output flicker, combinator 2 takes charge of the output and sends M.

Tick 10: (assuming input was held for 7 ticks)
Input I is now zero.

Tick 11:
Combinator 1 is now sending nothing, there is no longer a reset signal.

Tick 12:
Combinator 2 is now sending nothing.
Simultaneously, combinator 3 has now become active and is sending M from memory.

Reset explanation:

An R signal is sent to combinator 3, making it lose its memory.

Nitroxleecher
Manual Inserter
Posts: 1
Joined: Thu May 11, 2017 1:00 pm
Contact:

### Re: Simple 3-combinator memory cell - handles bursts+negatives

Thank you for sharing!
Just what I needed!

AlexAegis
Inserter
Posts: 41
Joined: Sat Jun 04, 2016 10:25 pm
Contact:

### Re: Simple 3-combinator memory cell - handles bursts+negatives

Hi! I made an alternative version, same footprint, stores multiple things, but instead of a dedicated 'reset' signal it has a dedicated 'set' signal. (can set to nothing to reset). I credited your design everywhere where I posted it.

viewtopic.php?f=8&t=64649

Gecko
Long Handed Inserter
Posts: 53
Joined: Sat Nov 29, 2014 8:52 pm
Contact:

### Re: Simple 3-combinator memory cell - handles bursts+negatives

The case I was using this for is the cell only accepting values that are bigger than the already saved value and forwarding the value. But never accepting values lower than the stored one. I tried some different approaches but never got a satisfying result. I think a (this) cell would be my best shot though I can't get it to work properly.

Any tips of hints would be greatly appreciated!

cheers, Gecko