Digital Boolean 1.1

download Digital Boolean 1.1

of 12

Transcript of Digital Boolean 1.1

  • 8/13/2019 Digital Boolean 1.1

    1/12

    Electrical/Electronicand Digital

    applications

    Digital Control 1 Jim Flounders

    SOUD2235 - Design and simulate logic circuits to a given specification

    Phil Illingworth

  • 8/13/2019 Digital Boolean 1.1

    2/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 1of 11

    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 + C D = 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

    A C + B C + A D + B D

  • 8/13/2019 Digital Boolean 1.1

    3/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 2of 11

    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

    . .

    = A B + A B we can replace this into our equation and use DeMorgans rule again on the

    second bracket

    . A B + C this simplifies again

    . A B + 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

    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 careat

    10.

    Dec A B C D X

    0 0 0 0 0 0

    1 0 0 0 1 0

    2 0 0 1 0 0

    3 0 0 1 1 0

    4 0 1 0 0 1

    5 0 1 0 1 1

    6 0 1 1 0 1

    7 0 1 1 1 0

    8 1 0 0 0 0

    9 1 0 0 1 0

    10 1 0 1 0 0

    11 1 0 1 1 0

    12 1 1 0 0 1

    13 1 1 0 1 0

    14 1 1 1 0 1

    15 1 1 1 1 1

    8 4 2 1

  • 8/13/2019 Digital Boolean 1.1

    4/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 3of 11

    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

  • 8/13/2019 Digital Boolean 1.1

    5/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 4of 11

    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 isrepresented as one 8 and zero 1s, or 108. I am given the octal value 1336, I can convert this into

    decimal like so.

    Digits 1 3 3 6

    Numbering 3 2 1 0

    I now multiply the top value by 8 to the power of the bottom value and add each corresponding

    value

    1x83

    + 3x82+ 3x8

    1+ 6x8

    0

    (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 3 3 6

    001 011 011 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 256 128 64 32 16 8 4 2 1

    0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1

    Our binary value is 0001 1111 0001 0011

  • 8/13/2019 Digital Boolean 1.1

    6/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 5of 11

    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 samemethod 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 theHex value 0D71

    I can make up a table to illustrate the digits I u will use and the numbering

    Digits 0 D 7 1

    Numbering - 2 1 0

    The table shows D represents 13

    13x162+ 7x16

    1+ 1x16

    0

    (3328) + (112) + (1) = 3441

    I have now shown how to work between all methods and can complete the table

    Decimal Hexadecimal Binary Octal

    7955 1F13 0001-1111-0001-0011 17423

    734 2DE 0000-0010-1101-1110 1336

    3441 0D71 0000-1101-0111-0001 6561

    33025 8101 1000-0001-0000-0001 100401

  • 8/13/2019 Digital Boolean 1.1

    7/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 6of 11

    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 implementfunctions 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 A B C F G Hex0 0 0 0 0 0 0

    1 0 0 1 1 0 2

    2 0 1 0 0 1 1

    3 0 1 1 0 0 0

    4 1 0 0 1 1 3

    5 1 0 1 0 0 0

    6 1 1 0 1 1 3

    7 1 1 1 0 0 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

    3 address lines A,B,C 2 data lines F,G

  • 8/13/2019 Digital Boolean 1.1

    8/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 7of 11

    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 A K Q0 J1 Q1 Q2

    0 1 0 0 0 0 0

    1 1 0 1 1 0 0

    2 1 0 1 1 1 0

    3 1 1 1 0 0 1

    4 1 1 0 0 0 0

    5 1 0 0 0 0 0

    6 1 0 1 1 0 0

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

    state diagram

    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

    A=1

    101 001

    D B

    011

    C

    J K

    0>0 0 x

    0>1 1 x

    1>0 x 1

    1>1 x 0

    Clock Q2 Q1 Q0 Location

    0 0 0 0 A

    1 0 0 1 B2 0 1 1 C

    3 1 0 1 D

    4 0 0 0 E

    5 - - - -

    000

    A

  • 8/13/2019 Digital Boolean 1.1

    9/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 8of 11

    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 Gray code

    b. A three bit grey code-to-decimal decoder is to be designed, where the outputs X[7:0] areactive 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.

    A2 A1 A0

    0 0 0

    0 0 1

    0 1 0

    0 1 1

    1 0 0

    1 0 1

    1 1 0

    1 1 1

    A2 A1 A0

    0 0 0

    0 0 1

    0 1 1

    0 1 0

    1 1 0

    1 1 1

    1 0 1

    1 0 0

  • 8/13/2019 Digital Boolean 1.1

    10/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 9of 11

    A2 A1 A0 X1 X2 X3 X4 X5 X6 X7

    0 0 0 0 1 1 1 1 1 1 1

    1 0 0 1 1 0 0 1 1 1 1

    2 0 1 1 0 0 1 0 0 1 0

    3 0 1 0 0 0 0 0 1 1 0

    4 1 1 0 1 0 0 1 1 0 0

    5 1 1 1 0 1 0 0 1 0 0

    6 1 0 1 0 1 0 0 0 0 0

    7 1 0 0 0 0 0 1 1 1 1

    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 = + A2 A1 A0 + A2

    A0

    X3 logic = + A1 A0

    X4 logic = + A0 + A2 A1 + A1 A0

    X5 logic = + A0 + A1 + A2 A1 + A2 A1 A0 + A2

    X6 logic = + A0 + A1 A0 + A1 + A2

    X7 logic = + 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 Ccannot 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 mapexplorer to generate the table and map.

  • 8/13/2019 Digital Boolean 1.1

    11/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 10of 11

    Question 2

    1. a. Explain the idea behind the von Neumann architecture. To what extent do moderncomputers 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).

  • 8/13/2019 Digital Boolean 1.1

    12/12

    SOUD2235 - Electrical / Electronic and Digital applicationsA01/13

    Page 11of 11

    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 controllingexternal devices?