top of page
  • Writer's pictureZoe Chowdhury

Design of Combinational Circuits

Welcome back! This is a continuation of Project 3 where we explore all things combinational.


Last week, we discussed the procedure for analyzing a circuit when given a circuit diagram. This week, we will be doing the opposite where we produce a circuit given a problem statement of what we need that circuit to do.


Problem statement: Create a converter that converts BCD code to Excess-3 code

First, we need to understand what is being asked of us and that starts with understanding what is the meaning of a binary-coded system.


Binary Coded Systems

Binary code represents data such as numbers, text, and computer instructions using a two-symbol system. The two symbols are “0” and “1”. These numbers form the basic layer of all computing systems and are the primary language of digital technologies.


An n-bit binary code is a group of n-bits that produces up to 2^n distinct combinations. For example, to represent four elements, you would need 2 bits, with each element assigned to one of the following combinations: 00, 01, 10, 11. A set of eight elements would require a 3-bit code, then 16 elements require a 4-bit code.


When we look at the decimal digits which is in base 10, we would require a set of 10 unique elements. Therefore, the smallest n-bit binary code we would use is a 4-bit code. When the number of elements in a set isn’t a multiple power of 2, there will be unused bit combinations. As is the case with the decimal digits. So, we use the first 10 bits to represent a binary number and leave the last 6 unassigned.


We can use different binary codes by arranging four bits into 10 distinct combinations. One way of doing this is called binary‐coded decimal and is commonly referred to as BCD.


Binary‐coded decimal system

Although the binary number system is the most used system for a computer, most people are used to the decimal system. In addition to that, operations like addition and multiplication need to be done to convert binary numbers to decimal numbers and vice versa. However, in binary-coded decimal, only 10 different combinations are possible (see below) in each 4-bit binary sequence. This makes binary-coded decimal an easier way to represent decimal numbers.


Binary-coded decimal (BCD) is system of writing numbers by assigning a four-digit binary code to each digit 0 through 9 in a decimal (base 10) number. Each digit is encoded separately. The full number is first segregated into its individual digits. These digits are then represented by their equivalent 4-bit binary-coded decimal codes.


For example, convert 185 in base 10:

You see how the decimal number 185 is separated into 1, 8, and 5 and then those single digits are converted to their binary codes which are 0001 1000 0101.


Excess-3 code system

Another example of this is Excess-3 code. This coding system is used in some older computers. Excess-3 codes are obtained by adding 3 to each decimal digit then expressing it as a 4-bit binary number for each digit.


For example, convert decimal number 23 to Excess-3 code:

We add 3 to both digits in the decimal number and then convert it to a 4-bit binary number for the result of each digit:


Now we can get back to the design procedure.


Step One: Determine inputs and outputs

We have established that any binary codes for decimal digits will require at minimum 4 bits. This means that the BCD inputs will require 4 bits and the Excess-3 outputs will require 4 bits.


Step Two: Derive Truth Table

As mentioned previously, a binary code will have some unassigned bit combinations if the number of elements in the set is not a multiple power of 2. Therefore, a binary code that distinguishes among 10 elements must contain at least four bits, but 6 out of the 16 possible combinations remain unassigned.


The output of those unused input combinations is marked with “x” to mean we don’t care about their outputs. When using k-maps, we can designate these don’t care values to be either 1 or 0 if it makes simplifying the circuit easier.


The BCD inputs will list binary values from 0 to 9 and the output will be the Excess-3 values which is the BCD value plus 3 expressed in binary.


Therefore, the truth table will look like the following:


Step Three: Find Boolean functions and simplify

Since we have 4 output variables, we have four output functions namely w, x, y, and z.


First, we have w:

Then we have x:

Then we have y:

Lastly, we have z:


Step Four: Produce the circuit and verify it

First, we arrange the functions in a way that makes building the circuit easier for us.


Here, we found a common term between the functions which is (C+D) and that is beneficial since we can use the same intermediate product for multiple functions. This reduces the number of logic gates we need to use and makes building the circuit easier.


Now we can build our circuit:

The final step is to verify that the circuit meets the specifications by running each input combination through the circuit to see whether the outputs match the truth table. You can see me do that near the end of this week’s video:



Now that we have an understanding of how to analyze and design circuits, we are going to use this knowledge to build adders next week!


8 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page