---
# System prepended metadata

title: Digital Design Lab 2
tags: [IUG, Digital Design, Computer Engineering, 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>Authors: Usama R. Al Zayan and Enaam Rajab<span style="float:right">2022/09/22</span></h6>
<h6>
    Parts of this Lab were adapted from work done by Mohammed Nafiz ALMadhoun and Mai Z. Alyazji.</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 | | | | |

<br/>

### 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>

<br/>

### Task 3: Connecting ICs together

In this task using Logisim-Evolution, you should simulate the previous expression using ICs (TTL tab in Logisim).


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

<br/>

### Task 4: Connecting ICs together

In this task, you should build it with the **available ICs**!


<br/>

## DataSheets
Please find the datasheets here:

**$74/04$** [DM74LS04 Hex Inverting Gates](https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS04_FairchildSemiconductor.pdf).
**$74/08$** [DM74LS08 Quad 2-Input AND Gates](https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS08_FairchildSemiconductor.pdf).
**$74/02$** [DM74LS32 Quad 2-Input OR Gate](https://cdn.datasheetspdf.com/pdf-down/7/4/L/74LS02_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>