Minecraft / Projects

8 bit CCA Based program counter, does branching

infoWhat is PMCView3D? Read the Schemagic feature announcement for more info.

  • 11
  • 5
  • comment
  • playlist_add
  • share
  • more_horiz
avatar _Phrozenbit_
Level 28 : Expert Electrician
103
Hey ^_^

I was watching a video of Bennyscube a while back, on how to build a Carry Cancel Adder (CCA). I thought 'I could make a counter out of this' since it's a really fast type of adder. Went building and came up with this.

What does it do

It counts in 8 bit binary numbers, and has the ability to 'jump' immediately to a given number at any time while running. This device can be useful when you want a computer to compare values and based on the comparison result jump to other lines in a program. Also know as Conditional branching.

How it works

First is the CCA adder, it can be fed an A value, and a B value. Essentially the output of the adder is fed back to input A, and input B is statically set to 0000 0001. Between the output of the adder is a memory register, built with locking repeaters. The output of that register is gated with a bunch of AND gates and is on by default. The clock will save each new adder result into the register at every pulse.

When you want it to branch, you want to ignore the value that is in the output register so we disable that gate first. Then you would want to accept the 8 bit number, the address you want to branch to for example, and pass that to the A inputs instead. You also want the output register to update again and set it on the output bus and make the cycle of adding 0000 0001 continue and temporarily disable the 0000 0001 that's set on input B. This all happens when you push the branch button.

How to operate

You need to know binary. On the control panel there's a lever on a yellow block. Flip it on and it will start counting. You will see the lamp between the red blocks flashing, that's the clock's pulse. The output can be read using the vertical lamp array at the right of the panel. Least significant bit is on the bottom. You can also step through one by one using the button next to the lever on the yellow blocks.

Next to the output display, are levers on light blue blocks. Using these you can set a 8 bit binary number, least significant bit is also on the bottom. If you've set a number you can press the button on the light blue block next to the yellow ones to make the counter jump to that number.

Credits / thanks

I've used Bennyscube's Carry Cancel Adder design to make this counter. Also thanks for looking at my submission :D feel free to use this build in your projects. Included is the minecraft 1.12.2 schematic. If you like the build please leave me a diamond :D
Creditbennyscube for CCA design
Progress100% complete
Tags

Comments : 0

star Login or register to post a comment.

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome