Jump to content

Help
Latest News Article

8 and 16 bit binary to decimal decoders


78 replies to this topic

#1

Posted 23 July 2011 - 04:51 PM

Hello..

NEW VERSION USING REDPOWER (3.2 SECONDS)

!UPDATE AGAIN!
I've improved the system and now it can decode any 16 bit in only 4.8 seconds.. It performs a shift (including add) in only 3 ticks.. But right now it makes 16 shifts.

I've also made a 8 bit version, which converts a 8 bit binary to decimal in only 24 ticks = 2.4 seconds.
!UPDATE AGAIN!

The other day I released my first binary decoder, but it was very slow.. I've made a new one, which is much faster! The old one used 24 ticks per shift- the new one only uses 3 ticks per shift.. :D That means it can decode any 16 bit binary code to decimal in only:
16 shifts * 3 ticks/shift = 48 ticks = 4.8 seconds

Here it is:


Overview: (New version (16 bit), 16 shifts @ 3 ticks)
Posted Image

Overview: (New version (8 bit), 8 shifts @ 3 ticks)
Posted Image

Decoding part (8 bit):
Posted Image

Here is a more detailed explanation of the shifts and the "adders".

Download: (EVEN NEWER VERSION (8 bit and 16 bit) - 8/16 shifts @ 3 ticks = 2.4/4.8 seconds)
Download world save

Download: (EVEN NEWER VERSION (16 bit only) - 16 shifts @ 3 ticks = 4.8 seconds)
Download world save


Download .schematic file

Download: (NEW VERSION - 13 shifts @ 4 ticks = 5.2 seconds)
Download world save
Download .schematic file

Download: (Old version - 16 shifts @ 4 ticks = 6.4 seconds)
Download world save

Download .schematic file

Have fun!

Register or log in to remove.

#2

  • Location: Iowa, QC
  • Minecraft: Shreddykickflip

Posted 23 July 2011 - 05:04 PM

OO
|-|
| |
| |
| |
| |
| |
|_|

That's my face right now. Not a penis.
Download my Redstone texture pack Here! Now available for 1.2.4!

#3

Posted 23 July 2011 - 08:20 PM

View Postshreddykiclflip, on 23 July 2011 - 05:04 PM, said:

OO
|-|
| |
| |
| |
| |
| |
|_|

That's my face right now. Not a penis.

Hehe thanks.. And good thing you mentioned that.. :P

#4

    faneQ

    Coal Miner

  • Members
  • 117 posts
  • Location: Romania

Posted 23 July 2011 - 09:15 PM

make a step by step tutorial:D
Posted Image

#5

  • Location: Iowa, QC
  • Minecraft: Shreddykickflip

Posted 23 July 2011 - 09:35 PM

How does your +3 module work? Cause mine ended up being huge (30ish x 20ish x 5) Did you not use adders? I get all of the BCD to 7seg stuff, it's just the +3 factor and shifting that killed me :P
Download my Redstone texture pack Here! Now available for 1.2.4!

#6

Posted 23 July 2011 - 10:44 PM

View PostfaneQ, on 23 July 2011 - 09:15 PM, said:

make a step by step tutorial:D

This might explain some of it..

View Postshreddykiclflip, on 23 July 2011 - 09:35 PM, said:

How does your +3 module work? Cause mine ended up being huge (30ish x 20ish x 5) Did you not use adders? I get all of the BCD to 7seg stuff, it's just the +3 factor and shifting that killed me :P

No I'm not using adders.. The only combinations that can occur are:
(0) 0000 -> 0000 (No need to include)
(1) 0001 -> 0001 (No change)
(2) 0010 -> 0010 (No change)
(3) 0011 -> 0011 (No change)
(4) 0100 -> 0100 (No change)

(5) 0101 -> 1000 (3 added)
(6) 0110 -> 1001 (3 added)
(7) 0111 -> 1010 (3 added)
(8) 1000 -> 1011 (3 added)
(9) 1001 -> 1100 (3 added)


Where the colors are represented here, which is one of the four decoders (they are the same).

Posted Image

(The signal comes from the side the picture has been taken from)
The green block are the inputs and the yellow ones are the outputs.. So this thing can decode the above binary codes to the "added" code.. I didn't bypass the signal as the old on did because that meant, that if "add"-code had been recognized, the bypassing signal would have to be inhibited from continuing, and that would have added at least 2 ticks per cycle.

Here is an example, where I've send 0111 (green), which then get altered to 1010 (yellow):

Posted Image

The shifts are made with wire, which get transfered to the next "station" like this (blue ladder):

Posted Image

The signals repeat this process in loops, which is illustrated here:

Posted Image

Red = 1st loop
Yellow = 2nd loop
Purple = 3rd loop
Green = 4th loop
Brown = 5th loop
Etc.
Each loop takes 4 ticks.

If you can imagine it, this process can loop like this: (example, where only one "high" is sent in the decoder)

0001
0010
0100

1000 (Add 3 and shift)
0110 (Add 3 and shift)
0010
0100


Where the green ones are same, so it has to be stopped by an inhibitor, but they takes 2 ticks, so instead I put in pistons in front of some of the existing repeaters.

Does it make more sense now.? Ask if you've any questions..

#7

  • Location: Iowa, QC
  • Minecraft: Shreddykickflip

Posted 23 July 2011 - 11:30 PM

That's brilliant. Someone back on my thread "Massive Decoder" linked to a site which also had a layout which used manual shifting, but it still had to use adders! This is just awesome man Posted Image
Download my Redstone texture pack Here! Now available for 1.2.4!

#8

Posted 23 July 2011 - 11:43 PM

View Postshreddykiclflip, on 23 July 2011 - 11:30 PM, said:

That's brilliant. Someone back on my thread "Massive Decoder" linked to a site which also had a layout which used manual shifting, but it still had to use adders! This is just awesome man Posted Image

Thanks! Actually that was the thread I was inspired to make one of these.. Stumbled upon it the other day, learned how to convert binary to decimal in hand and then built my first version (8 bit) then expanded it (16 bit) and then I build this from scratch.. I guess this is your layout:

Posted Image

It can be built in may ways, but I can't think of a way to complete a cycle in less than 4 ticks.. 1 ticks for recognition of the codes - 1 tick for sending new output out and minimum 1 tick for passing the signal forward in the process with a repeater.. But it could be cool to see a working 3 ticks decoder, if that's possible..

#9

Posted 24 July 2011 - 12:29 AM

You know.. when the idea of just letting it "free run" in loops with no latches first occured to me..
I figured no one would ever be able to get it all sync'd right...

Epic man! Truely Epic! B)

Now.. just make it 13ops @ 4ticks.. and I think we have a winner! :P

#10

Posted 24 July 2011 - 01:04 AM

FYI the downloads are broken.
Posted Image

jon99977 said:

"Using science I have finally concluded that Big trees are larger than small trees."

#11

Posted 24 July 2011 - 01:28 AM

View PostDaftasBrush, on 24 July 2011 - 12:29 AM, said:

You know.. when the idea of just letting it "free run" in loops with no latches first occured to me..
I figured no one would ever be able to get it all sync'd right...

Epic man! Truely Epic! B)

Now.. just make it 13ops @ 4ticks.. and I think we have a winner! :P

Thanks! :D But let me say it caused some troubles to sync it right.. Especially the part where the bits get stored.. :S

And about the ops - shouldn't be a problem.. I'll make that tomorrow.. So basically that would bake it decode the 16 bits in 52 ticks = 5,2 seconds.. :P Sweeeeet..

View Postkab00oom, on 24 July 2011 - 01:04 AM, said:

FYI the downloads are broken.

Thanks for the tip.. They're fixed now.. :)

#12

Posted 24 July 2011 - 02:09 AM

So im pretty new to advanced redstone. Is this just like 5 displays hooked up to seperate decoders then with a adder thing attached to it? Lol I have no idea haha.

#13

  • Minecraft: Hans_Lemurson

Posted 24 July 2011 - 06:48 AM

Nice! I come back from my vacation to find that somebody actually built the decoder!

This represents a truly great day for "Easy to Use" computing with Redstone. It is no longer impossibly complex to display results from a binary computer in Decimal.

It would be interesting to watch the displays as the numbers get shifted in rather than having them be shut-off until the final answer.
Hans Lemurson's Thread of Links: http://www.minecraft...hread-of-links/
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.

#14

Posted 24 July 2011 - 09:44 AM

wooo nice
do you know i have no idee waht to type here. you are wasting your time come go away
are you stil reading what are you doing those seconds never come back

#15

Posted 24 July 2011 - 11:32 AM

View PostDaftasBrush, on 24 July 2011 - 12:29 AM, said:

You know.. when the idea of just letting it "free run" in loops with no latches first occured to me..
I figured no one would ever be able to get it all sync'd right...

Epic man! Truely Epic! B)

Now.. just make it 13ops @ 4ticks.. and I think we have a winner! :P

Thanks! It's actually a much simpler way instead of having advanced shift registers.. But here you go - 13ops instead of 16.. :D (With a little explanation included):



#16

Posted 24 July 2011 - 11:39 AM

View PostMrGarrett1345, on 24 July 2011 - 02:09 AM, said:

So im pretty new to advanced redstone. Is this just like 5 displays hooked up to seperate decoders then with a adder thing attached to it? Lol I have no idea haha.

Hehe - I can understand you're confused.. I would have been the same thing a couple of days ago.. But this thing can do the same as this: Online binary to decimal decoder
If you type any 16 bit combination in the upper box a number will show in the middle box - that's what my creation can..

View PostHans Lemurson, on 24 July 2011 - 06:48 AM, said:

Nice! I come back from my vacation to find that somebody actually built the decoder!

This represents a truly great day for "Easy to Use" computing with Redstone. It is no longer impossibly complex to display results from a binary computer in Decimal.

It would be interesting to watch the displays as the numbers get shifted in rather than having them be shut-off until the final answer.

Thanks! :D Well about the 0's was just the easiest way of making this.. :P But if you connect the wire on the stairs, which continue up to the repeater, which goes into the piston (which pushes downwards) and connect that wire (before the piston) to the decoder bank, it should show the numbers as the get shifted through the decoder.. Did that make any sense at all? hehe - pretty confusing when I read it myself..


View Postmrjmking80, on 24 July 2011 - 09:44 AM, said:

wooo nice

:D

#17

Posted 24 July 2011 - 02:07 PM

View PostMinecrafter9, on 24 July 2011 - 11:32 AM, said:

Thanks! It's actually a much simpler way instead of having advanced shift registers.. But here you go - 13ops instead of 16.. :D (With a little explanation included):
Felt like it was possible.. but wasn't 100% sure the design would allow it... grabbing the save now.

View PostMinecrafter9 (in the OP), on 24 July 2011 - 11:32 AM, said:

That was the hardest part.. To "catch" a 3 tick signal, which is only separated by one tick to the next
Might have a simpler way of doing that.. tried it on the "old" (yesterday's) one, and it seemed to work..
I'll test it on the new version, should work just as well..
If it does I'll let you know. ;)

#18

Posted 24 July 2011 - 02:11 PM

View PostDaftasBrush, on 24 July 2011 - 02:07 PM, said:

Might have a simpler way of doing that.. tried it on the "old" (yesterday's) one, and it seemed to work..
I'll test it on the new version, should work just as well..
If it does I'll let you know. ;)

Nice.! As you see on mine, I got two repeaters next to each other on top to extend the signal from 3 to 4 ticks.. Otherwise I couldn't get the latch to register the input..

#19

Posted 24 July 2011 - 03:09 PM

View PostMinecrafter9, on 24 July 2011 - 02:11 PM, said:

Nice.! As you see on mine, I got two repeaters next to each other on top to extend the signal from 3 to 4 ticks.. Otherwise I couldn't get the latch to register the input..
Yup.. but after the "simplicity" of the majority of it.. suddenly having torch gates and different delays.. seemed "Out of place"

This.. seems to work just as well.. and I'll think you'll agree it's simpler.
Posted Image

The repeaters before the piston just delay the signal by the right amount..
Note that they are all set to 1.. which stops them from removing the "pause" tick.

It works with 2,3 or 4.. so I went with 3 because that should mean you're hitting the middle of the "sss" signal phase.

The repeater after the pistons is set to 3 to stretch out the short "blip" that makes it through into a signal that will reliably set the latches.

Had to make one other change.. down the 10,000 end.. you'd got some repeaters set to 3 compensating for those bits not going through the adder.. they were removing the p if those bits were set..
I just replaced each repeater that's set to 3.. with 3 repeaters set to 1... fitted in lovely.

Edit:
Oh.. if you can make the pistons come down 2 ticks earlier.. you'd only need 1 repeater delay before each piston...
Looked like there's was no way to remove repeaters from the piston drive lines.. needed for distance, but I've not followed it back to "source" yet.

Edit2:
Found it.. looks like (not tested) you might be able to ditch all 3 repeaters before each piston.. just use wire, and move the repeater after the piston back next to the block...
Trying it now.

#20

Posted 24 July 2011 - 03:34 PM

View PostDaftasBrush, on 24 July 2011 - 03:09 PM, said:

Yup.. but after the "simplicity" of the majority of it.. suddenly having torch gates and different delays.. seemed "Out of place"

This.. seems to work just as well.. and I'll think you'll agree it's simpler.

The repeaters before the piston just delay the signal by the right amount..
Note that they are all set to 1.. which stops them from removing the "pause" tick.

It works with 2,3 or 4.. so I went with 3 because that should mean you're hitting the middle of the "sss" signal phase.

The repeater after the pistons is set to 3 to stretch out the short "blip" that makes it through into a signal that will reliably set the latches.

Had to make one other change.. down the 10,000 end.. you'd got some repeaters set to 3 compensating for those bits not going through the adder.. they were removing the p if those bits were set..
I just replaced each repeater that's set to 3.. with 3 repeaters set to 1... fitted in lovely.

Edit:
Oh.. if you can make the pistons come down 2 ticks earlier.. you'd only need 1 repeater delay before each piston...
Looked like there's was no way to remove repeaters from the piston drive lines.. needed for distance, but I've not followed it back to "source" yet.

Edit2:
Found it.. looks like (not tested) you might be able to ditch all 3 repeaters before each piston.. just use wire, and move the repeater after the piston back next to the block...
Trying it now.

NICE! Good work! And I agree - it's more simple.. But when I finally got it to work I didn't wanted to simplify it more.. :P (If I could) When you're finished I'd like to see the map if I may.. I can post it in the top of this thread, if you'd like that..

EDIT
When I think about it, I guess the pauses could be removed making it easier to catch the signal and the input-panel would be shortened by 16 block.. And that means, that 1 or 2 tick(s) can be cut off from start to stop.. :o 1 TICK!!!