This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
bump. Anybody?
Quote from bleachisback »
D Flip-Flops are used for memory. It's used instead of an RS-NOR latch if you want to store both on and off data, and control when it is saved (like a save button or something). JK Flip-Flop, I'm still figuring out...
Think I'm gonna expirement right now.
EDIT: I have no Idea why you would want to use a JK-FF instead of an RS-NOR latch.
A JK flip-flop can be used as both a T and a D flip-flop. it’s useful for a counter where you want to be able to increment (by chaining Ts together) and also load a specific value. It’s also handy as a universal component because you can wire it to work as a D, T or RS-type flip-flop – not very practical with redstone ones, but it might be if we got a flip-flop component block.
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.?
First off, the reason Q and ~Q (not Q) is important is more for an electrical reason. Usually in a chip you want to have both outputs so you save space and gates. But think it more that you have an option for either out.
For a D Flip-Flop, It is a device that can hold a 1 or a 0. You can only set that 1/0 once you put a 1 to a clock. Imagine a teenager who isn't caring what you are saying. But you give them a dollar they will care, at-least till the gift of money goes away. That is a clock. You use this so you can have a line with data on and that the memory will only "read and store" it when you want.
JK flipflop is a bit different. Think of it as memory block that needs commands. When JK=0, it is told to hold state and do not change its output. When K=1, J=0 Its told to change its output to a 1. J=1, K=0 to change it to 0. When JK=1, then its told to "flip" the output. A clocked JK flip-flop, only cares about the JK inputs when the clock is set.
I've been wanting a good JK flip-flop design for a while. If you put an inverter between the J and K lines, you have a D-latch. If you combine the JK lines into an input, you have a toggle switch. You can stack JK flip-flip flops to make a counter, shift-register etc.
The 'clock' is only really necessary if you're planning large-scale, time-sensitive digital operations, though, right? You could make the flip-flops 'care' all the time pretty easily, I assume.
So, to be clear, JK's have four "commands:"
00 - hold state
01 - set to 1
10 - set to 0
11 - toggle state from what it was previously
Something like that? I actually have taken a course on circuits, but it has been a while and we mostly tried to program in Assembly (which loves to change registers without telling you about it, lol). We didn't spend a ton of time memorizing flip-flop/latch properties and, like I said, the descriptions on the wiki were a bit ambiguous.
The 'clock' is only really necessary if you're planning large-scale, time-sensitive digital operations, though, right? You could make the flip-flops 'care' all the time pretty easily, I assume.
“Clock” is kind of misleading. “Control” is more accurate. In real digital logic you use a shared clock to synchronize operations, but with redstone the simulation itself takes care of that. However, you may want to use control pulses to ensure values are only stored when certain conditions are met.
For instance, if you’re doing some sort of calculation, the output is likely to fluctuate while the value is being computed. You don’t want to lock it into a register until it’s stable. This can be achieved using a control pulse, either triggered by the completion of the calculation or a delay line.
Another example is a RAM array, where you’d use the C input as a select line: a write address bus determines which RAM cell a write control pulse will be sent to to store a value.
I guess i'll post here since my topic got 0 replies in 10hours.
How do I make an adder + connect that to a display i have already made?
(calculator on my mind but im too noob for that stuff)
There are basically two ways to achieve this:
[*:qhznpemi] Do the research, learn to understand binary logic, work out what components are needed, find appropriate component designs and assemble them yourself. (The main component you’ll need is a bank of full adders; there are several compact full-adder designs in this thread.)
[*:qhznpemi] Find someone who’s already done the whole thing, if anyone has, and copy them.
There is no intermediate way where someone can explain how to do it without actually doing the work for you, so that you get something you can honestly call your own without doing the boring bits.
For reference, the ALU design linked in my signature implements addition and subtraction, and multiplication could be implemented on top of it using a small amount of machine code. A full-on calculator with a user interface would be significantly more complicated than what I have so far, although you could simplify away the AND command and F muxer.
Unlike the previous one this can be chained horizontally, making it a true improvement over the 2x4x5 design.
I've built a 4-bit module to demonstrate. In this case I put the clock line in a trench, but there are a few different ways it can be oriented depending on actual usage.
I am currently in the process of creating a tic tac toe game out of redstone. Although most of it is pretty simple, redstone wise, I am struggling with the win logic circuit. Not understanding the logic required, I understand that, but I am having great difficulty actually creating the circuit without it being monumentally massive. Is it possible someone could create a compact version of this (where 1-9 are the inputs):
(1 AND 2 AND 3) OR (4 AND 5 AND 6) OR (7 AND 8 AND 9) OR (1 AND 4 AND 7) OR (2 AND 5 AND 8) OR (3 AND 6 AND 9) OR (1 AND 5 AND 9) OR (3 AND 5 AND 7)
What you have there is a disjunctive normal form expression. A smaller, optimized solution is almost certainly possible, but a simple generalish¹ approach can be built using a grid.
This is the ground level.
Each row represents a conjunction (AND expression), and each column a variable (controlled by a switch in this example). A torch on a block causes a variable to participate in the conjunction. For instance, the top row has torches for 1, 2 and 3, and the bottom row has 3, 5 and 7. The torches on ground level and below are acting as half-repeaters.
Above the torches, a wire runs across each conjunction and feeds into another torch.
The key torches below, together with these wires and the output torches on this level, form n-ary AND gates. A single wire running across the output torches forms an n-ary OR gate:
This circuit uses positive input and output conventions: powering the variables corresponding to a winning solution will power the output wire on top.
Note: Switching outputs is a little slow due to its mechanical nature. I haven't tested doing this yet, but you should be able to set all chained memory values to either 0 or 1 by hooking all buttons to 1 main wire that opens only 1 door in each memory unit.
So for example, if you wanted to make a minecart station with a destination control panel; you can set all memory units to 0 except the one you pressed by connecting all buttons together in 1 main input wire, which connects to the door on the right in each memory unit.
Rollback Post to RevisionRollBack
[Water] The Water Award Of Boating!
[wood] The Wood Award Of (not having to) Lumbering!
Still playing around with these... here's a 1x5x6 version of the vertical D-latch:
Nice!
There's a labeling error that goes all the way back to the first posted version of this, though - Q and ~Q are swapped. I sent Zorac a PM mentioning it after I realized that, but apparently neglected to post anything about it in the thread, or correct the version I'd added here. (The D and T's I had added to the wiki got labeled appropriately though.)
Specifically, when D is on and the clock ticks, the RS latch wire on the right gets activated, making that Q. When D is off, the wire along the top turns on, so that's ~Q.
Hey guys, I understand redstone really well but I'm not so sure on the low level computer engineering and how to replicate it. Could someone just give me a brief kind of 'you need x latch to simulate z which should forward to y...' kind of thing? Like how to make a CPU I've seen lots of videos of them but never but never any brief indication of how to make one. I know you need a clock which is simple enough but what kind of clock speed should I aim for? that kind of thing...
Here's yet another D-latch. It's also 2x3x5, this time with the clock input from the side. It's a bit easier to connect from below than the previous 2x3x5 design.
You flip the switch on the right and then turn it off just as the door at the left side opens. The current should continue to loop forever with no power source. The delay is caused by the inverters. This will switch states about 2 times a second. All the doors along the top open and close in order. If you don't time it perfectly it will get faster and faster and become always on or become slower and turn off.
What could be done with this?
Maybe able to make a "sprint through a tunnel with doors closing behind you" kind of action scene.
Cool!
Rollback Post to RevisionRollBack
Quote from ThatGuyCarth »
I love Blizzard, but god help me, WoW is a giant money engine that uses human souls as fuel.
I'm having trouble with the XNOR "E" and "F" designs on the Wiki page:
I've double- and triple-checked it, and I don't know what the problem is.
I can't make F work either, haven't tried E.
Rollback Post to RevisionRollBack
Quote from Esthin »
The creeper would SSS, but then stop as I held him in my arms. I would look down upon him, and his frown would turn into a beautiful smile.
He would look up at me.. A single tear would come from his eye, and he would say "Thank you".
Sadly, we're all making the vertical diagrams by hand. Vertical display on the redstone sim would be great!
bump. Anybody?
Think I'm gonna expirement right now.
EDIT: I have no Idea why you would want to use a JK-FF instead of an RS-NOR latch.
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
First off, the reason Q and ~Q (not Q) is important is more for an electrical reason. Usually in a chip you want to have both outputs so you save space and gates. But think it more that you have an option for either out.
For a D Flip-Flop, It is a device that can hold a 1 or a 0. You can only set that 1/0 once you put a 1 to a clock. Imagine a teenager who isn't caring what you are saying. But you give them a dollar they will care, at-least till the gift of money goes away. That is a clock. You use this so you can have a line with data on and that the memory will only "read and store" it when you want.
JK flipflop is a bit different. Think of it as memory block that needs commands. When JK=0, it is told to hold state and do not change its output. When K=1, J=0 Its told to change its output to a 1. J=1, K=0 to change it to 0. When JK=1, then its told to "flip" the output. A clocked JK flip-flop, only cares about the JK inputs when the clock is set.
I've been wanting a good JK flip-flop design for a while. If you put an inverter between the J and K lines, you have a D-latch. If you combine the JK lines into an input, you have a toggle switch. You can stack JK flip-flip flops to make a counter, shift-register etc.
Not sure if I got the point as much as I could:P
My new version of Redstone Simulator
Main Code Site: http://code.google.com/p/red-stone-simulator/
The 'clock' is only really necessary if you're planning large-scale, time-sensitive digital operations, though, right? You could make the flip-flops 'care' all the time pretty easily, I assume.
So, to be clear, JK's have four "commands:"
00 - hold state
01 - set to 1
10 - set to 0
11 - toggle state from what it was previously
Something like that? I actually have taken a course on circuits, but it has been a while and we mostly tried to program in Assembly (which loves to change registers without telling you about it, lol). We didn't spend a ton of time memorizing flip-flop/latch properties and, like I said, the descriptions on the wiki were a bit ambiguous.
“Clock” is kind of misleading. “Control” is more accurate. In real digital logic you use a shared clock to synchronize operations, but with redstone the simulation itself takes care of that. However, you may want to use control pulses to ensure values are only stored when certain conditions are met.
For instance, if you’re doing some sort of calculation, the output is likely to fluctuate while the value is being computed. You don’t want to lock it into a register until it’s stable. This can be achieved using a control pulse, either triggered by the completion of the calculation or a delay line.
Another example is a RAM array, where you’d use the C input as a select line: a write address bus determines which RAM cell a write control pulse will be sent to to store a value.
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
There are basically two ways to achieve this:
[*:qhznpemi] Do the research, learn to understand binary logic, work out what components are needed, find appropriate component designs and assemble them yourself. (The main component you’ll need is a bank of full adders; there are several compact full-adder designs in this thread.)
There is no intermediate way where someone can explain how to do it without actually doing the work for you, so that you get something you can honestly call your own without doing the boring bits.[*:qhznpemi] Find someone who’s already done the whole thing, if anyone has, and copy them.
For reference, the ALU design linked in my signature implements addition and subtraction, and multiplication could be implemented on top of it using a small amount of machine code. A full-on calculator with a user interface would be significantly more complicated than what I have so far, although you could simplify away the AND command and F muxer.
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
Unlike the previous one this can be chained horizontally, making it a true improvement over the 2x4x5 design.
I've built a 4-bit module to demonstrate. In this case I put the clock line in a trench, but there are a few different ways it can be oriented depending on actual usage.
Schematic file (includes both): Schematic
Edit: Fixed labeling error.
What you have there is a disjunctive normal form expression. A smaller, optimized solution is almost certainly possible, but a simple generalish¹ approach can be built using a grid.
This is the ground level.
Each row represents a conjunction (AND expression), and each column a variable (controlled by a switch in this example). A torch on a block causes a variable to participate in the conjunction. For instance, the top row has torches for 1, 2 and 3, and the bottom row has 3, 5 and 7. The torches on ground level and below are acting as half-repeaters.
Above the torches, a wire runs across each conjunction and feeds into another torch.
The key torches below, together with these wires and the output torches on this level, form n-ary AND gates. A single wire running across the output torches forms an n-ary OR gate:
This circuit uses positive input and output conventions: powering the variables corresponding to a winning solution will power the output wire on top.
Schematic
¹ What’s missing here is a simple way to deal with three adjacent torches in a column.
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
Note: Switching outputs is a little slow due to its mechanical nature. I haven't tested doing this yet, but you should be able to set all chained memory values to either 0 or 1 by hooking all buttons to 1 main wire that opens only 1 door in each memory unit.
So for example, if you wanted to make a minecart station with a destination control panel; you can set all memory units to 0 except the one you pressed by connecting all buttons together in 1 main input wire, which connects to the door on the right in each memory unit.
[wood] The Wood Award Of (not having to) Lumbering!
Check out my design videos for cool ideas to implement into your minecraft worlds:
Boat Dispenser v1.0, Boat Dispenser v2.0, Boat Junction, Wood Generator, The Ticker
Other way around. I like! Very elegant.
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
Nice!
There's a labeling error that goes all the way back to the first posted version of this, though - Q and ~Q are swapped. I sent Zorac a PM mentioning it after I realized that, but apparently neglected to post anything about it in the thread, or correct the version I'd added here. (The D and T's I had added to the wiki got labeled appropriately though.)
Specifically, when D is on and the clock ticks, the RS latch wire on the right gets activated, making that Q. When D is off, the wire along the top turns on, so that's ~Q.
Thanks heaps.
I've double- and triple-checked it, and I don't know what the problem is.
Cool!
I can't make F work either, haven't tried E.