Donate
navigation
Untitled Document
Latest topics
» This is a thing again, it's hopefully her to stay for a long time.
Sat Sep 22, 2018 3:04 am by timmie124

» Hello?
Sat Sep 22, 2018 3:02 am by timmie124

» Another New Minecraft Server, TSC 4.0
Mon Mar 12, 2018 8:37 pm by Poiuytas

» New Minecraft Server! #TSC3.0
Wed May 31, 2017 10:56 am by timmie124

» 1.2 = out
Fri Apr 21, 2017 12:54 am by Poiuytas

» BRING BACK THE SERVER
Fri Apr 07, 2017 1:20 am by JugsMcBulge

» NEW RANKING SYSTEM (WIP)
Fri Apr 07, 2017 1:15 am by JugsMcBulge

» El Sleezo's Pawn (Back)
Fri Apr 07, 2017 1:10 am by JugsMcBulge

» not sure if we're still doing this but...
Fri Apr 07, 2017 1:09 am by JugsMcBulge


Redstone and Stuff

Go down

Redstone and Stuff

Post by Guest on Mon Jul 25, 2011 3:41 am

It's late and I'm bored.

A. Getting Started

We all love this stuff, redstone. Most people don't do much with it, but it's quite fun once you get how it all works.

Redstone is just on and off. 1 and 0. Once you readily understand and grasp this concept, everything becomes a lot easier. And remember, make everything just so you really understand what you're doing. Being book smart, and having actual experience are two different things.

1. Basic Knowledge

Just about everyone knows how to connect a lever to a door, but some other basic rules of redstone are not "common knowledge".

a.Torches give off power in many ways.
Redstone wire doesn't have to be next to a torch. It's useful to know how torches give off (and don't give off) power and to use that to your advantage.


b.Repeaters are WEIRD
They send signals through blocks, and can even receive through blocks. It is also important to note that you can change the delay on the repeaters. The default is at 1 tick, or 0.1 seconds. The maximum is 4 ticks, or 0.4 seconds.


c. How torches turn off
One of the most misunderstood things. Ever. To turn off a torch, give it power(technically the block it's on), be it from a lever, pressure plate, button, or even another torch.

The torch you want to turn off can't be like this:


It should be like this:


d. Different ways to give power
Levers, pressure plates, buttons. Beautiful things they are. Each has a different property that might make it more useful for a certain application. So it's good to know what each does.

Levers- Keeps giving power until you turn it off. This is important, and you must remember this specific thing about levers. It's going to piss you off when you don't know why something isn't working and you realize a lever is on.

Pressure plates- I believe it gives power until you step off. Useful for doors/hidden traps.

Buttons- Doorbells, combo locks, a lot of nice things. It keeps giving power a little after being pressed.

2. Logic Gates
Probably the most useful thing to know about redstone for somewhat complex circuits. Say you want a door to open if, and only if, two levers are pulled, you would need some knowledge of logic gates to accomplish this. (or dumb luck. :p)
I will put a truth table for every gate, 1 is on, 0 is off. A truth table just tells what the output of the logic gate will be with the given inputs. I will put it in form:
input 1, input 2:output
Levers will indicate inputs.

a. NOT
The simplest gate. All it is, is a torch on a side of the block. It also functions as an inverter or repeater.


b. AND
When input 1 and input 2 are on, the output will be off. As in my example earlier. You would need this logic gate to accomplish the task.
Truth Table
0,0:1
1,0:1
0,1:1
1,1:0



c. NAND
When input 1 and input 2 are on, the output will be off. This is basically an AND gate with a NOT gate at the output.
0,0:1
1,0:1
0,1:1
1,1:0



d. OR
When input 1 or input 2 are on, the output will be on. This would be useful for having two levers open a door, but either lever can be pulled to open it.
0,0:0
1,0:1
0,1:1
1,1:1


e. NOR
When input 1 or input 2 are on, the output will be off. Like the AND/NAND gate, the NOR gate is a OR gate with a NOT gate on the output.
0,0:1
1,0:0
0,1:0
1,1:0


f. XOR
When input 1 and input 2 are the same, the output will be on. This is a lesser used logic gate, but I'll put it in here.
0,0:1
1,0:0
0,1:0
1,1:1
*No XOR or XNOR designs as I don't like them, and they're not as used, if you're still curious check out the wiki page.

g. XNOR
When input 1 and input 2 are the same, the output will be off. The same as the AND/NAND shenanigans. NOT gate on the output of the XOR.
0,0:0
1,0:1
0,1:1
1,1:0

B. Some more serious shit
I'm more iffy about this stuff, but that's ok. Once you have a firm understanding of logic gates and how redstone works, it's good to learn some more fun things.

1. Clocks
It tells the time, not in this sense, but it does do something clocks do well, which is be periodical. Clocks in this definition send out an output in a set amount of time. A five clock, for example, sends out a signal every 0.5 seconds. These are useful for things that you want to happen periodically.


Here's a 5-clock. It repeats every 5 ticks.

Last note: Clocks must be odd if you don't want to use repeaters, if you use repeaters the amount of torches must be odd.
2. Latches and Memory Cells
These are crucial for anything that you want stored. If you want a door to stay open, you might want to learn a bit about these.

a. RSNOR latch
My favorite, and by far the most used(despite lacking real world applications). The RS, stands for set and reset (it's really SR, but who cares, right?) As the name implies, this latch has a set and a reset. When you give power to the unpowered side (the set), the other side becomes unpowered. If you want to give power back to the set, you have to give power to the other side (the reset).


b. Toggle Flip-flop
Another useful memory cell, and has a good use in actual electronics, but we'll get to that later. the toggle flip-flop changes it's output every time you give it power. So, if it's on, and you give it power, it'll turn off. If you give it power again, it'll turn on. And so on and so on. This can be useful for opening a door with a button on the inside and outside.

Input on right, the lever. Output on the left.

c.JK Flip-flop
The exact same thing as a toggle, except that it has two more inputs, J and K. The out put doesn't change if J and K are off. If J is on and K is off the output will be on. If J is off and K is on, the output will be off. If J and K are both on, the output will be like a toggle flip-flop.

Inputs on the right, J on the bottom, normal input in the middle, K on the top. Output on the left.

d. Data flip-flop
The most used flip-flop in the real world, protip, this is your RAM. (I think). There are two inputs D and C, the output will be what D no matter what you do to C. If you change D, the output will change too. BUT if C is on then changing the input of D won't change. This is more for people who want to build computers and stuff in minecraft. There aren't many applications for this latch.

The two inputs on the left. D on top and C on bottom.

PROTIP: There are a lot of designs for these latches. I mean, A LOT. (Just look at the toggle flip-flop section) I'm giving the easiest to use/understand. The others may be better, but be sure to understand what the advantages/disadvantages of each are.

3. Binary/Hexadecimal (WIP)?
Basis of computers. All it is is 1s and 0s. But knowing just that is boring. So it's good to know more.

a. Binary
All the same rules apply just have to find the little caveat that makes it different.
Because binary is base 2 (1 and 0) adding 1 and 1 would be 2, but that wouldn't be in binary! So, 1 plus 1 is 0 with a 1 carried over. (like adding 9 and 5 and carring over the 1 to make 14) So two in binary would be 10. Add a one again and you get 11, or 3. Add 1 again, and you get 100, because the one gets carried over, and now you have 4.
Subtraction is the same, 1 minus 1 is 0. 1-0 is 1. etc.
Multiplication is also the same as normal math. 1 times 1 is 1. 1 times 0 is 0. 0 times 0 is 0.
Division can be a little complicated for dividing larger numbers. But the basis is the same. 1 divided by 1 is 1. 0 divided by 1 is 0. The rest... Well. I think it's divide by zero error. And we know what happens when you do that.

It's important to note that 2^0=1=1, 2^1=2=10, 2^2=4=100, 2^3=8=1000, 2^4=16=10000, and so on.

b. Hexadecimal
This is base 16. All the numbers are 0-9, and letters a-f. This isn't used that often, but it's nice if you want to do something with counters.

c. Counters
Counters do what their name says, count. But in binary. A counter is just a chain of toggle flip-flops (or if you want to get real technical, JK flip-flops with J and K set on high inputs). As you know, a toggle flip-flop turns on when it gets power, and back off. This doesn't mean that when you chain them together, they all turn on and off at the same time. When you have all the outputs of each toggle (I'll refer to one toggle flip-flop as a bit) set to 0. If you have a 4-bit counter (4 toggle flip-flops) giving power to the counter will affect the first toggle, making the first output on and the rest off. So, it's 1,0,0,0 When you do it again. It'll turn off the first bit and turn on the second. So 0,1,0,0. A third time results in 1,1,0,0. As you can see it's counting up in binary. These have many applications, so be creative with it.

Counters do have limits, however. A 4 bit counter can only count from 0-15 (16 total digits). A 3 bit 0-7 (8 total digits). So if you're planning to count really high, you're going to need a lot of toggle flip-flops. Another disadvantage is speed, most people don't really need fast counters, but it's good to know that the speed of the toggle flip-flop I gave you earlier takes about 0.3 seconds to change the output. The toggle might ignore some inputs if they're entered too quickly.

As it stands, counters also have to count from 0 to whatever bit. But if you put a reset onto the counter as it reachs a certain number, then it'll go back to 0. So if you have a 3 bit counter, which will count 0-7. If you want it to reset at 5, you have to put an AND gate that connects the two bits that are on when 6 is on. The AND gate's output then connects to the toggle flip-flop's resets.


A three bit counter.


I have circled where the reset for a toggle flip-flop is. Put a torch under there, and make sure it's off. When the reset is hit, the torch will turn on and reset the toggle flip-flop. Chain them up in order, and the delay between each torch must be at least .3 seconds to allow the toggle to reset.
WIPlol





Guest
Guest


Back to top Go down

Re: Redstone and Stuff

Post by Guest on Thu Aug 11, 2011 2:12 pm

WELL, you had a lot of spare time XD It's very useful though thanks for doing this Smile

Guest
Guest


Back to top Go down

Re: Redstone and Stuff

Post by timmie124 on Thu Aug 11, 2011 9:00 pm

i will be using this

_________________


TL;DR: While Iguanas CAN be fed on a mayonnaise only diet, it is hard to do and rarely worth the risk.

avatar
timmie124
Founder

Posts : 1522
Join date : 2011-06-11
Age : 24
Location : santa ana california

http://tscgaming.org

Back to top Go down

Re: Redstone and Stuff

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum