Showing posts with label Logic Circuits. Show all posts

Thursday, March 5, 2015

Logic Circuits: 1-digit Decimal in Excess-3 to Gray Code Converter

1 comment :
Problem: Design a digital circuit that converts an Excess-3 of a single-digit decimal input into Gray Code. Draw it's logic diagram.

In order to be able to design this circuit ourselves, we need to learn Excess-3 and Gray Code. We can familiarize ourselves to them at least.

First step in designing the circuit is to generate it's Truth Table. Let's label the inputs as A, B, C, and D and outputs as W, X, Y, and Z.

Single-digit Decimal in Excess-3 to Gray Code Converter Truth Table
Single-digit Decimal in Excess-3 to Gray Code Converter Truth Table
Based from what we've learned, Decimal 0 in Excess-3 is 0011 and Decimal 9 is 1100. Therefore, we will not care about the other outputs, thus, labeling them as Don't-cares (X). Be careful with the output as the required output is Gray Code.

Second step is finding the boolean functions of each of the outputs. Let us use Karnaugh maps (K-map). Learn about K-map through these examples here.
Boolean Function, W
W = AB + ACD
Boolean Function, X
X = A + BCD
Boolean Function, Y
Y = B'C'D' + BD + BC
Boolean Function, Z
Z = C'

Third step is to test the circuit manually by analysis, construction, or simulation of the circuit in some software. Here, let us simulate the circuit. If you have Proteus, download the Proteus 8 project file here (Dropbox link) for the circuit simulation.

1-digit Decimal in Excess-3 to Gray Code Converter
Simulation Screenshot

Finally, we need to draw the logic diagram of our design since it is being required.

1-digit Decimal in Excess-3 to Gray Code Converter Logic Diagram
Logic Diagram of the circuit
A, B, C, and D are the inputs. W, X, Y, and Z are the outputs. If you have any question, place a comment below.

Monday, January 19, 2015

Logic Circuits: 4-bit K-Map (Karnaugh Map) problem #1

No comments :
Simplify the following function using K-map: F(w,x,y,z) = Σ(8,10,12,13,14)

Solution:
K-map of F(w,x,y,z) = Σ(8,10,12,13,14)

This is a summation of minterms, therefore, 8, 10, 12, 13, and 14 are all 1's.

We can group the four 1's (the one's in Green) since there is only 1 bit difference from bits 00 to 10 (see figure). Please, review on Gray Code to understand better. And, we can group the two 1's (1's in Red). When dealing with minterms, an x is equal to 1 and an x' is equal to 0. Zero's will be listed as x' and one's as x.

Listing them, we get:

F = (w + w + w + w) (x + x + x' + x') (y' + y' + y + y) (z' + z' + z' + z') + (w + w) (x + x) (y' + y') (z' + z)

Now, we will simplify: w+w=w, x'+x'=x, y'+y=1

   = (w + w) (x + x') (y' + y) (z' + z') + (w) (x) (y') (1)

Then, simplify further: (w)(x)(y')(1)=wxy'

   = (w) (1) (1) (z') + wxy'

And, we get the answer:


F = wz' + wxy'
or
F = w(z' + xy')


-------------------------------------------------------------
Ask a question or comment on this solution below.
God bless!:)

Logic Circuits: 3-bit K-Map (Karnaugh Map) problem #2

No comments :
Simplify the following function using K-map: F(A,B,C) = Σ(0,2,3,7)

Solution:
K-map of F(A,B,C) = Σ(0,2,3,7)
This is a summation of minterms, therefore, 0, 2, 3, and 7 are all 1's. We can't group the 4 of them together since they don't form a square in the K-map (see figure). We can group them by pair. Notice the ones grouped in red. They can be grouped together since the difference between bits 00 and 10 is only 1 bit, and we can only group together bits that are 1 bit apart (review Gray Code, K-map is in Gray Code). When dealing with minterms, an x is equal to 1 and an x' is equal to 0. Zero's will be listed as x' and one's as x.

We need to list the variables. For the first term (red group), A has two 0's, B has one 0 and one 1, and C has two 0's. For the second term (green group), A has one 0 and one 1, B has two 1's, and C has two 1's as well.

F = (A' + A') (B' + B) (C' + C') + (A' + A) (B + B) (C + C)

Boolean Algebra Theorems state that x'+x'=x', x+x=xx'+x=1


= (A' ∙ 1 ∙ C') + 1 ∙ B ∙ C

They, also, state that x∙x=x, x∙1=x, and x'∙1=x'. Thus, we get the answer.


F = (A' ∙ C) + (B ∙ C)

-------------------------------------------------------------
Ask a question or comment on this solution below.


Saturday, January 17, 2015

Logic Circuits: 3-bit K-map (Karnaugh Map) problem #1

No comments :
Simplify the following function using K-map: F(x,y,z) = Σ(0,1,4,5)

Solution:
K-map of F(x,y,z) = Σ(0,1,4,5)
This is a summation of minterms, therefore, 0, 1, 4, and 5 are all 1's. We can group the 4 of them since they form a square in the K-map (see figure). When dealing with minterms, an x is equal to 1 and an x' is equal to 0. Zero's will be listed as x' and one's as x.

Now, we need to list the variables. x has two 0's and two 1's. y has four 0's. And, z has two 0's and two 1's.

F = (x'+x'+x+x) (y'+y'+y'+y') (z'+z'+z+z)

We need to simplify. Boolean Algebra Theorems state that x'+x'=x', and x'+x=1

   = (x'+x) (y'+y') (z'+z)
= ∙ y' ∙ 1

It, also, states that x∙1=x. Thus, we get the answer

F = y'

Review on Gray Code to understand better.
-------------------------------------------------------------
Ask a question or comment on this solution below.