---
# System prepended metadata

title: Digital Design Lab 2 - Boolean Algebra & Gates
tags: [IUG, Computer Engineering, Digital Design, Digital]

---

<h1 style='border: none'><center>Digital Design Lab 2</center></h1>
<h2 style='border: none'><center>Boolean Algebra & Gates</center></h2>
<h5><center>The Islamic University of Gaza<br>Engineering Faculty<br>Department of Computer Engineering</center></h5>
<h6>Author: Mohammed Nafiz ALMadhoun<span style="float:right">2021/10/04</span></h6>

---

## Boolean Algebra

<p style='text-align:justify'>
Expressing the boolean operations or equations using a regular language is a tricky thing, and it is very hard to describe complex systems.
As in your elementary school, you've learned your first math classes using simplified yet not descriptive words.
</p>
<p style='text-align:justify'>
The same goes for logic, if you want to express complex logic, you couldn't just say it as words, you will need to describe it algebraically, this will make it easier for you to implement, optimize, and to understand the system you are designing.
</p>

### Boolean Expression

<p style='text-align:justify'>
You will always need to express your logic gates as a mathematical expression, this is called Boolean expression, as, in regular algebra, there is a symbol for each operation or gate.
</p>

List of Gates symbols:
- AND (.)
- OR (+)
- NOT ($\bar{}$)
- XOR ($\oplus$)

### Operator Precedence (Operations Order)

As in regular math, the operators have precedence, so in this simple mathematical expression
<center>

$y = 5 + 3 * 2$
</center>

<p style='text-align:justify'>
You should (Oh MUST) know that you should solve the multiplication before the summation, and we have the same thing in Boolean expressions, and here is the order of the operations in Boolean expressions (NOT > AND > OR).
</p>

<div style="page-break-after: always;"></div>

#### Example

<center>

$F = x + y.z$
</center>

In this Boolean expression, you should know that we first calculate the result of $y$ **AND** $z$, then we calculate the result **OR** $x$

### Truth Table

<p style='text-align: justify'>
Now using the equation, you could easily fill its truth table by evaluating the expression for different cases (Which are limited, as a parameter could take only two values).
</p>

## Lab Tasks

### Task 1: Fill the truth Table

File the truth table for this expression:
<center>

$F=\overline{\bar{A}+\bar{B}}$
</center>


| $A$ | $B$ | $\bar{A}$ | $\bar{B}$ | $\bar{A}+\bar{B}$ | $F$ |
| --- | --- | --------- | --------- | ----------------- | --- |
| 0 | 0 | | | | |
| 0 | 1 | | | | |
| 1 | 0 | | | | |
| 1 | 1 | | | | |

### Task 2: Implementing a boolean expression
Using Logisim-Evolution, try to implement this expression using logical Gates (Don't use the ICs):

<center>

$F=A.\bar{B}+\bar{A}.B$
</center>

The output of this expression should be familiar to you ;)

<div style="page-break-after: always;"></div>

### Task 3: Connecting ICs together

In this task, you should simulate the previous expression using ICs (TTL tab in Logisim), then you should build it with the **available ICs**!

As you might know, we are running low on the 74/04 ICs (`NOT` gates), so you should use 74/00 (`NAND` gates), 74/02 (`NOR` gates) to implement the inverter (`NOT` gates).

For the `AND` gates, you need a 2-Inputs `AND` gate, but in the lab, we have a lot of 3-Inputs `AND` gates (74/11), so you could use it and connect the third input to `VCC`.

**Remember:** $A.1 = A$

Unfortunately, we do have OR gates, so I couldn't make it harder :D

**NOTE:** Each IC have multiple gates, use all the gates before connecting a new IC.

Please find the datasheets here:

74/00: https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS00_FairchildSemiconductor.pdf
74/02: https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS02_FairchildSemiconductor.pdf
74/04: https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS04_FairchildSemiconductor.pdf
74/11: https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS11_FairchildSemiconductor.pdf
74/32: https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS32_FairchildSemiconductor.pdf

<span style="color:#e20000" >**DON'T POWER UP THE KL-31001 WITHOUT MY PERMSIONS.**</span>
###### tags: `Digital Design` `Digital` `IUG` `Computer Engineering`
<center>End Of Lab 2</center>