DFF

Problem #141

Tags: logic

Who solved this?

Previous:TFF Next:Pulse Counter


Now let's look at the Data Flip-Flop (also known as a Delay Flip-Flop). This chip is the first step to creating some RAM.

     ┌───────────┐        
 D ●─┤           ├─● Q    
     │    DFF    │        
 E ●─┤           ├─● QBAR 
     └───────────┘        

The DFF chip will be in the state Q = 0 after it is initially placed.
The chip has two input pins - Data and Enable.
While E is high, the state of Q will be set to the state of D.
While E is low, the state of Q will remain unchanged.
QBAR will always transmit the opposite signal of Q.

So this chip has a sort of internal 1-bit memory of D.

The circuit board will come pre-installed with INPUT and OUTPUT chips as shown below:

───────┐                                                   ┌────────
       ├─● D                                           Q ●─┤        
 INPUT │                                                   │ OUTPUT 
       ├─● E                                        QBAR ●─┤        
───────┘                                                   └────────

Problem Statement

Real-Time Testcases
This task is the first to use the "real-time" alternative of testing. See the Wiki Page for a detailed explanation.

Digital Logic Circuit Interface
For these Digital Logic Circuits tasks, you will not be providing an answer string you would for other tasks.
Instead, your Solution Code will be interpreted directly to place chips onto the circuitboard and connect them with wires.
Click here to learn the Digital Logic Circuit Syntax used on this site.

After the chips have been placed and connected, the server will run a series of tests, randomly assigning values to the input pin(s) and checking to see if the output pins read the corresponding expected values. If all tests produce the expected outputs, then the circuitboard is considered a success.

Even though we won't be using the "Your answer" box, you'll still need to put something in that box to submit your solution. Just put anything - it will not be passed to the interpreter.

You need to login to get test data and submit solution.