# ABEL Logic Simplified

ABEL Logic is the simplest way to turn an idea in your brain to a working digital circuit.  It is very easy to understand, works like english and functions like a digital circuit so you can easily turn any idea into a working PLD chip that’ll do exactly what you want.  To get started writing your first ABEL powered device you just need to know your inputs, your outputs and what you want your outputs to do based on your inputs.  This is much simpler than it sounds.

Let’s say you have two buttons and a light bulb.  You want to turn on the light anytime one of the buttons is pushed. We’ll first give the buttons names and call them our inputs.  Button one will be called $B_{1}$ and button two will be $B_{2}$.  We’ll call the light bulb L.  Since ABEL is a digital circuit that means for every input and output we only have two combinations 1 or 0, on or off.  We use this to represent if they produce power or not.  In the language we use the exclamation point to represent off !.

First we check if button one is on:
$B_{1} = L$
This says if button 1 is on then light is on.  If we wanted to say button 1 is off then the light is on we would write that as !$B_{1} = L$.  That would cause it so every time the button isn’t pressed the light would come on, and the light would turn off when it is pressed.  This is known as an inverter.

Next we check if button two is on:
$B_{2} = L$
This does the same thing for button two.  The problem here is we can’t use both because then if only one button is pressed then the light gets both an on and an off signal, which is called a “Data contention error.”  Which can cause problems for our little bulb buddy when the circuit sends the wrong amperage with the same voltage.  So we have to combine them into one single statement using the english word OR.

$B_{1}$ OR $B_{2} = L$

This means if button 1 OR button 2 is pressed then light is ON. In ABEL we simplify the OR statement by using the character +.  So it becomes

$B_{1} + B_{2} = L$

If Mr. Bossman comes to use later and says whoah there!  I want it so the light only comes on if button 2 is pressed and button one is not then we would use our inverter character (the !) to change the circuit to:

!$B_{1} B_{2} =L$

This literally translates to NOT button1 AND button 2 turns light on.  Everything else keeps the light off.  We can use the OR make other combinations the boss might specify such as if button 1 is not pressed but button 2 is pressed or if both buttons are pressed at the same time.  The OR is represented by the addition symbol +.  The AND symbol is represented by the multiplication.  Which is literally what they mean in standard mathematics.

!$B_{1} B_{2} + B_{1} B_{2} = L$

This means the light comes on if NOT button1 AND button 2 is pressed or if button 1 and button 2 are pressed.

### Building A Garage Door Opener Using ABEL

Using our knowledge we just learned we can build just about anything by putting it into ABEL.  Let’s pretend Mr. Bossman tells us he wants us to build him a microchip that will control a garage door opener.  If the opener has power then it will open the door, if it doesn’t then it will shut the door.  There are two buttons and a safety laser.  One button is on the inside of the garage and the other on the outside.  There is a safety laser that is always on and if something blocks it will send a voltage to the circuit at which time we need to open the door immediately to make sure we don’t continue to shut it on a Fluffins the mildly braindamaged neighborhood cat.

While taking notes on what Mr. Bossman is telling us he wants we write:  Open door if Inside Button is on AND Laser is off OR open door if outside button is on AND Laser off OR open door if Laser is on.  In ABEL logic this gets written exactly as it is spoken, and we will use IB as inside button and OB as outside button and L as the laser and finally the door opener as the output of O.

IB!L+OB!L + !L = O

It really is that simple!  We can put that equation into an ABEL enabled PLD software and get a chip that when plugged into the correct inputs and outputs gives us a functioning garage door opener.  There are other commands and syntaxes to help you get really advanced with it.  Here is a great list of them: List of ABEL HDL commands.