You are on page 1of 7

# DIGITAL LOGIC DESIGN (Assignment 1) Submitted By:

## Hafiz Usman Mahmood 01317 BEE 4C

Problem 1
The given octal number (365)8 can be written in the Gray code and BCD code as follows: (i) GRAY CODE The binary equivalent of (365)8 is (011110101)2. The corresponding Gray code can be represented as follows: (010001111)GRAY (ii) BCD (8421) CODE The given octal number can be represented in BCD by first converting the octal number into decimal and then writing the BCD equivalent of each individual digit. This implies that: (365)8 = 3*82 + 6*81 + 5*80 (365)8 = (245)10 Hence, we can write the decimal equivalent of each digit of (245)10 to get our BCD code which is as follows (0010 0100 0101)BCD

Problem 2
(a)
The given expression is:

## To simplify this expression using algebraic manipulations, we proceed as follows: () ( ) ( ) ( ( ) ) ( ( ( ) ) )

(b)
The given expression is: [ ( ) ]

Algebraically manipulating the given expression, we can simplify the given function as follows: [ ( ) ( ] )

Problem 3
The given expression is: [ [ ( ( ( ) ( ( ) ( )( ) ) ( ) ) ] ] ( ) )

We can convert this expression into its canonical forms by following the procedure prescribed below: ( ( ) ) ( )

The above expression for is in the SUM OF MINTERMS form. The PRODUCT OF MAXTERMS form can be found by implementing truth table for function F. A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 are: D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 F 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1

## Hence, the canonical forms of the Boolean function ( (

) (Sum-Of-Minterms) ) (Product-Of-Maxterms)

Problem 5

From the above diagram, A, B, C are the inputs with the given HIGH and LOW values and the function is the output for which the values are given. By implementing the truth table, we can find out the Sum-of-Minterms and Product-of-Maxterms for . A 0 1 0 1 0 0 1 1 B 0 1 1 0 1 0 0 1 C 0 1 1 1 0 1 0 0 F 1 0 0 1 0 1 0 0

## Therefore, the required functions are as follows: ( ( Similarly, ( ( ) ( )( ) ( )( ) )( )( ) ) ) ( )

Problem 4
(a)
A 0 0 0 0 0 0 0 0 1 1 1 1 B 0 0 0 0 1 1 1 1 0 0 0 0 C 0 0 1 1 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 0 1 0 1 W 0 0 1 1 1 0 0 0 1 1 1 0

1 1 1 1

1 1 1 1

0 0 1 1

0 1 0 1

0 0 1 1

(b)
We are given 4-bit positive binary numbers. In 4-bit positive binary numbers, the MSB would represent the sign bit while the other three will represent the value. However, the numbers whose MSB is 1, they fall under the DONT CARE CONDITION in this case as they represent the negative numbers. A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 X 0 0 0 1 0 1 0 1 1 1 0 1 0 1 1

(c)
If AB and CD differ by 2 or more, than our output is 1 otherwise 0. A 0 0 0 0 0 0 0 0 1 1 1 B 0 0 0 0 1 1 1 1 0 0 0 C 0 0 1 1 0 0 1 1 0 0 1 D 0 1 0 1 0 1 0 1 0 1 0 Y 0 0 1 1 0 0 0 1 1 0 0

1 1 1 1 1

0 1 1 1 1

1 0 0 1 1

1 0 1 0 1

0 1 1 0 0

(d)
In Excess-3 code, the digits greater than 9 are usually not represented as they are regarded as unused bit-combinations. Hence, these combinations are not used hence dont care. A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Z 1 1 0 0 1 0 0 0 0 1 -