Você está na página 1de 12

Electrical/Electronic and Digital applications

Digital Control 1 Jim Flounders


SOUD2235 - Design and simulate logic circuits to a given specification Phil Illingworth

SOUD2235 - Electrical / Electronic and Digital applications A01/13 Question 1 1. Simplify the following Boolean expressions using De Morgans theorem and / or Boolean algebra: a. AC + ACD+ ABC+ ABCD We can apply DeMorgans laws to Boolean Equations to help simplify them, the two rules (AQA, 2013), shown below, allow us to build equations only involving one sort of gate.

A way of remembering the rule is that if you break the bar, you change the function We also need to use some of the rules of Boolean algebra; these are shown in the table below (CSCI 2150, 2001)

We are asked to simplify

using DeMorgans laws and Boolean algebra

First we need to factorise the equation A C + C D + A B C + C D we can now look through the table above and find a suitable rule for progressing through the equation. We can apply rule 11 to both sets of brackets to simplify. C+CD = C+D C + C D = C + D we can now add this back in

A C + D + AB C + D now we can factorise this C + D A + A B we can now apply rule 11 from the table to simplify the second set of brackets A + A B = A + B we can now add this back in C+D A+B Now we need to multiply out these brackets

C A + C B + D A + D B and to finish off we can alphabetise AC+BC+AD+BD

Page 1 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13

We can start of by applying DeMorgans law to the equation, this will separate the long bar between the two brackets and change the function from OR to AND . . we can replace this into our equation and use DeMorgans rule again on the

= AB+AB second bracket

. A B + C this simplifies again . AB + C

2. Simplify the following Boolean equation, in sum-of-products form, using a Karnaugh map: a. f(A,B,C,D) =(4,5,6,12,14,15), with a dont care at 10. The first step towards setting up a Karnaugh map is to create a truth table for the inputs, in this case we have four inputs, A, B, C and D and we only need the first Ten values as we have a dont care at ten but as we are asked to go up to 15 I will fill the table in, we build the truth table by converting the decimal value into binary and finding the values given in the equation above Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 8 B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 4 C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 2 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 X 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1

Now I have completed my truth table the information can be added to a Karnaugh map, for simplicity I will use Karnaugh Map Explorer 2.0 (Techie Buzz, 2013). This confirms my truth table is correct and relays the information into a Karnaugh map with a dont care at 10.

Page 2 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13

From the information in the Karnaugh map I can now simplify the original Equation f(A,B,C,D) =(4,5,6,12,14,15) F (A, B, C,D) = B + B

3. Simplify the following Boolean equation, in product-of-sums form, using a Karnaugh map:

As we are using the product of sums method we use the inverse of the information put into the Karnaugh map to find out answer, I drew out a Karnaugh map in rough using the information and then plugged this into Karnaugh Explorer 2.0, shown below. As we are using product of sums we group the zeros F(ABCD) = B + + + D

Page 3 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13 4. assuming that all numbers are 16 bits wide, complete the missing entries which are not shaded in the following table. (Note: no marks will be awarded unless you show how the solution is derived):

My first step is to look up some conversion tables for converting between decimal, hex, binary and octal and find information on moving between each set of data. Octal is also known as the Base 8 number system, the values used in the base 8 system are 0,1,2,3,4,5,6 and 7. The value 8 is represented as one 8 and zero 1s, or 108. I am given the octal value 1336, I can convert this into decimal like so. Digits Numbering 1 3 3 2 3 1 6 0

I now multiply the top value by 8 to the power of the bottom value and add each corresponding value 1x83 + 3x82 + 3x81 + 6x80 (512)+(192)+ (24) + (6) = 734 so octal 1336 = decimal 734 I can work back the other way using long division Octal to Binary can be achieved by simply working out the Binary value for each digit of the given number as shown below

1
001

3
011

3
011

6
110

we can add 4 more 0s to the end of the above values as we are asked to make all numbers 16 bits wide, giving us 0000-0010-1101-1110

Binary is to base 2, we can make a small table to help convert from decimal into binary, we have been told that all numbers are 16 bits wide so we take binary values up to the 16th from right to left, then we take our decimal value 7955 and work from left to right marking either a 0 or a 1 in each corresponding box to make up our value and give us our complete binary number 32763 16384 8192 4096 2048 1024 512 0 0 0 1 1 1 1 Our binary value is 0001 1111 0001 0011 Page 4 of 11 256 1 128 0 64 0 32 0 16 1 8 0 4 0 2 1 1 1

SOUD2235 - Electrical / Electronic and Digital applications A01/13 As a check we can add each value with a 1 together to get our original value 4096 + 2048 + 1024 + 512 +256 + 16 + 2 + 1 = 7955 Hexadecimal is to base 16 so we can use the same method as with base 8 to convert from hex to decimal but replace the power 8 with 16.

The table to the left (Learn44, 2011), shows the conversions from decimal to hex to binary. We have the Hex value 0D71 I can make up a table to illustrate the digits I u will use and the numbering Digits Numbering 0 D 2 7 1 1 0

The table shows D represents 13

13x162 + 7x161 + 1x160 (3328) + (112) + (1) = 3441

I have now shown how to work between all methods and can complete the table Decimal Hexadecimal 7955 1F13 734 2DE 3441 0D71 33025 8101 Binary 0001-1111-0001-0011 0000-0010-1101-1110 0000-1101-0111-0001 1000-0001-0000-0001 Octal 17423 1336 6561 100401

Page 5 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13 5. An 8 x 2 ROM is to be used to implement simultaneously the following Boolean functions: f(A,B,C) = AC + ABC g(A,B,C) = BC + ABC a. Complete the missing stored data values (in hexadecimal) in the table below to implement functions f and g. Also, state how you would connect the logic variables, and functions f and g, to the ROM

I will draw up my own table to clearly show all address lines and data lines and the hexadecimal output

Hex 0 1 2 3 4 5 6 7

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1 3 address lines A,B,C

C 0 1 0 1 0 1 0 1

F 0 1 0 0 1 0 1 0

G 0 0 1 0 1 0 1 0 2 data lines F,G

Hex 0 2 1 0 3 0 3 0

6. Sketch the Moore state diagram for the circuit below, where A is the input variable. You may assume that initially, Q[2:0] = 000:

Q0

Q1

Q2

Page 6 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13 I first need to draw up a truth table showing all possible outcomes, I will need to consider the rule shown in the table to the left. Clock 0 1 2 3 4 5 6 A 1 1 1 1 1 1 1 K 0 0 0 1 1 0 0 Q0 0 1 1 1 0 0 1 J1 0 1 1 0 0 0 1 Q1 0 0 1 0 0 0 0 Q2 0 0 0 1 0 0 0

0>0 0>1 1>0 1>1

J 0 1 x x

K x x 1 0

I can now take another table from this to clearly show my output data before putting into a Moore state diagram

Clock 0 1 2 3 4 5

Q2 0 0 0 1 0 -

Q1 0 0 1 0 0 -

Q0 0 1 1 1 0 -

Location A B C D E -

We can stop at clock 4 as we have returned back to 0 0 0, I can now put this into a Moore state diagram

000 A

A=1

101 D 011 C

001 B

Page 7 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13 7. Given that the variables A[2:0] form a three bit grey code to represent numerical values: a. Write down all binary combinations for A[2:0], in ascending order of numerical value. We are ask to write all binary combinations for a 3-bit Gray code, Gray code is a binary number system where two successive values always differ in only one bit, according to Magnus Fern (2011), Gray code is widely used in digital television systems as a means of error correction. Below I will show both the 3-bit binary table and the 3-bit Gray code table

Binary A2 0 0 0 0 1 1 1 1 A1 0 0 1 1 0 0 1 1 A0 0 1 0 1 0 1 0 1

Gray code A2 0 0 0 0 1 1 1 1 A1 0 0 1 1 1 1 0 0 A0 0 1 1 0 0 1 1 0

b. A three bit grey code-to-decimal decoder is to be designed, where the outputs X[7:0] are active low. Write down the Boolean functions for each output terminal. We need to use seven segment to work out our logic, Seven segment is the numbers you see on LCD displays such as alarm clocks, shown below (Wismer Margaret, 1997)

a a = X1 , b = X2, c = X3, d = X4, e = X5, f = X6, g = X7

The next step is to create a table showing the Gray code (A2:A0) inputs and outputs (X1:X7)before converting the outputs into Boolean functions. Page 8 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13 A2 0 0 0 0 1 1 1 1 A1 0 0 1 1 1 1 0 0 A0 0 1 1 0 0 1 1 0 X1 1 1 0 0 1 0 0 0 X2 1 0 0 0 0 1 1 0 X3 1 0 1 0 0 0 0 0 X4 1 1 0 0 1 0 0 1 X5 1 1 0 1 1 1 0 1 X6 1 1 1 1 0 0 0 1 X7 1 1 0 0 0 0 0 1

0 1 2 3 4 5 6 7

Now we can take the logic for each output (X1:X7)by looking down the X columns and taking the logic from anywhere that there is a 1 X1 logic = + A0 + A2 A1 X2 logic = X3 logic = X4 logic = X5 logic = X6 logic = X7 logic = + A2 A1 A0 + A2 A0 + A1 A0 + A0 + A2 A1 + A1 A0 + A0 + A1 + A2 A1 + A2 A1 A0 + A2 + A0 + A1 A0 + A1 + A2 + A0 + A2

8. Consider the Boolean function: f = ABC + AB+ AC a. Implement this function using one 4x1 multiplexer with the restriction that the variable C cannot be connected to a multiplexor select line. Multiplexers (MUX) are combinational logic switching devices, they are used for controlling multiple channels made up of 2,4,8 or 16 individual inputs. First we need to write a truth table and Karnaugh map for our function, I will use the Karnaugh map explorer to generate the table and map.

Page 9 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13

Question 2 1. a. Explain the idea behind the von Neumann architecture. To what extent do modern computers conform to this architecture? The idea of Von Neumann architecture is that the program processing a set of data in a computer should be stored in the memory along with the data itself, meaning reprogramming the computer could be achieved much quicker and easier. The name comes from the American Scientist John Von Neumann, one of the head scientists from the Manhattan project which saw the construction of the worlds first atomic bomb, In the 1940s it could take weeks to reprogram a computer to perform a different calculation and John Von Neumanns idea was intended to rapidly speed up these procedures.

The picture above (Teach-ICT, 2013) shows the architecture In modern day computing the memory holding both data and programming is what we call Random access memory (RAM).

Page 10 of 11

SOUD2235 - Electrical / Electronic and Digital applications A01/13 b. Explain why modern computers contain both Dynamic RAM (DRAM) and Static RAM (SRAM)? DRAM is a type of memory you find in everyday computers, built up inside a chip are capacitors which hold information and transistors which act like a switch letting the control unit either read the capacitor value (0 or 1) or change its state. For the capacitor to show a 1 it needs to be charged (filled with electrons) and to show a 0 it needs to be emptied, DRAM functions by constantly recharging these capacitors so that they dont lose the stored data. SRAM uses flip flops to hold each individual bit of information, it works at a much higher speed than DRAM as it functions with transistors hard wired in and doesnt need to be constantly refreshed. This takes up more space on a chip meaning it's significantly more expensive than DRAM. We use SRAM in a computers CPU as its fast and expensive and we use DRAM for the computers storage c. Explain how interrupts are used by a microcontroller, and their relevance in controlling external devices?

Page 11 of 11

Você também pode gostar