Redstone 4 Bit Counter

This forum can be used for everything relating to Minecraft! Suggestions for the server, showing off your work, looking for other members to build with, etc.

Redstone 4 Bit Counter

Postby Regulus » July 16th, 2012, 12:43 am

It may not look like much from the outside, but at least it works. :D
Image

What this does is count from 0 to 15. About every 8 seconds, the number shown on the display will increase by 1. When it gets to 15, it resets back to 0.

Although this counter isn't particularly useful, considering that this is the first time I've ever done anything with redstone, I'm quite impressed.

I got the idea to do this because it's something I've done many times using circuit designing software. I already knew how to make this work, the hard part was learning how to make it work with redstone.

Which is why my first setup failed.
Image

And my second, third, and fourth. :annoyed:
Image

Now that I've got it working, it really isn't so complicated anymore. In fact, the entire circuit is quite organized and systematic.

The display is made up of 7 panels. A, B, C, D, E, F, and G. A is at the top, and the rest continue clockwise, with G being the center panel. Image

The power line to each panel is represented by one of the gold paths below. A on the right, F on the left.
Image

But, the way these lines receive power is a bit more complex. Perpendicular to each gold power line, is an iron power line underneath it. Each iron line represents a number, starting with zero, and ending with 15. The seventh line, for example, connects to the gold lines representing A, B and C, while the eighth line connects to all the gold lines.
Image

With the exception of slight unintended delays in the system, only one iron line is powered at a time. So, whenever a path marked by a number is receiving power, it sends it to the respective panels.

Now, how these numbered paths receive power is from AND gates. Quite simply, AND gates only activate if two inputs are both on. Each number has 3 AND gates, arranged in a triangle shape, so that the number is only on if the four respective subpaths are at the right conditions. Here's the line of AND logic gates.
Image

And this is where it kinda gets a bit complicated. Why four, you ask? Because with four different paths, each with the possibility to be on or off, there are 16 possible combinations of states. If all paths are off, this represents zero. If all are on, that represents 15. Here, you can see each of the four paths, before they branch off to each of the AND gates.
Image

This is why it's called a 4-bit counter. A bit, in computer terms, is a zero or a one; literally a bit of data. At this point, the counter is working in binary code. To understand binary, all you have to do is think about our decimal number system. Whenever you count, when you get to 9, you go back to 0 and start again with a 1 in front of it. That 1 represents 10 units. In binary, you do the same, but you count to 1, then when you get to 2, go back to 0, and add a 1 in front of it, which represents 2. So, basically:

0000 = 00
0001 = 01
0010 = 02
0011 = 03
0100 = 04
0101 = 05
0110 = 06
0111 = 07
1000 = 08
1001 = 09
1010 = 10
1011 = 11
1100 = 12
1101 = 13
1110 = 14
1111 = 15


Now, I know what you're thinking. Why would I ever use this system? Well, that's because we're getting to the beginning of the circuit. Notice the pattern of each number. the right most digit alternates between each number. The one to the left of it changes states when the right most digit changes from one to zero. The same thing happens with the digit to the left of that one, and so on.

That's how this works. A single clock powers this entire circuit. In electrical terms, a clock is a device that generates a steadily fluctuating electrical signal. These three 'flip flops' take that signal, and create another signal, at exactly half the frequency of the input. Since they're all connected to each other, this is how the power for the four paths is generated, which counts in binary.
Image

And there you have it. The entire system weighs in at around 200+ block long. Yeah, I have way too much time on my paws. And to think much more complex circuits are small enough to fit on a wrist... :P
Image

Hopefully, this project has been an inspiration. If not, I still don't blame anyone for hating redstone. This was the most frustrating thing I've ever done in Minecraft. I have to say, I'll never be doing something quite this ambitious ever again. :umno:

Free tours are available! Go to the flat world to see it. 8-)
Regulus
Is differentiable...

User avatar

Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

But convergence is not guaranteed.

Posts: 10994
Joined: September 29th, 2011, 1:19 am
Location: W⋅N²=(40.498°)³, W²⋅N=(57.345°)³
Nickname(s): Reg, Regs, Last Person to Post
Gender: Male
Pride Points: 206

Re: Redstone 4 Bit Counter

Postby Moka » July 16th, 2012, 1:21 am

This is honestly the coolest thing I've gotten to see first hand in Minecraft. I've played around with redstone before, but I'm not a hardware guy. It's really impressive you were able to do this with it being your first time using redstone. Great explanation of the whole system, too. I finally understand how the converter from binary to your segmented display works. :P

Well done, Regulus! If you do ever have ambition to work on any smaller redstone projects, I wanna see them. :3
Moka
:D

User avatar

Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

Posts: 6228
Joined: June 5th, 2008, 5:04 am
Gender: Male
Pride Points: 138

Re: Redstone 4 Bit Counter

Postby Arani » July 16th, 2012, 2:42 am

It's amazing! Me, Dashie and Kops toured it earlier today and we were all blown away! The most amazing thing I have ever seen! Amazing job, regs! =)
Arani

Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

Posts: 4029
Joined: June 30th, 2010, 8:39 am
Pride Points: 56

Re: Redstone 4 Bit Counter

Postby Regulus » July 16th, 2012, 3:23 am

Thank you. It is pretty cool, isn't it? :macho2:

And, by the way, if it's ever not working, that's probably because the clock needs to be reset. I think that's a bug or something.
Regulus
Is differentiable...

User avatar

Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

But convergence is not guaranteed.

Posts: 10994
Joined: September 29th, 2011, 1:19 am
Location: W⋅N²=(40.498°)³, W²⋅N=(57.345°)³
Nickname(s): Reg, Regs, Last Person to Post
Gender: Male
Pride Points: 206

Re: Redstone 4 Bit Counter

Postby Daenerys » July 16th, 2012, 4:02 am

Incredible Regs, like Rani said, our minds were blown. Amazing job.
Also sorry for the chat messages on the screenshots...
XD

~RD
Image
Daenerys
♛ queen ♛


Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

nightmare dressed like a daydream

Posts: 12786
Joined: February 16th, 2011, 6:11 am
Nickname(s): rena/dashie/whatever
Gender: Female
Pride Points: 175

Re: Redstone 4 Bit Counter

Postby le0 » November 19th, 2012, 12:22 am

Way to complicated for me. xD
le0
User avatar

Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

Posts: 2294
Joined: November 13th, 2012, 4:39 pm
Nickname(s): Jonas
Gender: Male
Pride Points: 15

Re: Redstone 4 Bit Counter

Postby Regulus » November 19th, 2012, 12:39 am

Geez, I've just realized it's been so long since I last played MC.

I have another idea for a redstone project, although it won't be nearly as complex as this one. It will involve minecarts. :D
Regulus
Is differentiable...

User avatar

Years of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membershipYears of membership

But convergence is not guaranteed.

Posts: 10994
Joined: September 29th, 2011, 1:19 am
Location: W⋅N²=(40.498°)³, W²⋅N=(57.345°)³
Nickname(s): Reg, Regs, Last Person to Post
Gender: Male
Pride Points: 206


Return to MLK Minecraft

Who is online

Users browsing this forum: No registered users and 2 guests