1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Logic Gates

  1. Feb 8, 2015 #1
    1. The problem statement, all variables and given/known data
    Make the design of a circuit returning the absolute value of a number of 3 bits . The input and output
    must be signed , use the complement 2. Show your approach and draw your track
    using logic gates.

    I seriously do not understand this at all. What am I supposed to do?
    2. Relevant equations
    N/A

    3. The attempt at a solution
    N/A
     
  2. jcsd
  3. Feb 8, 2015 #2

    phinds

    User Avatar
    Gold Member
    2016 Award

    What is your background? How much have you studied logic and/or digital electronics? What kind of course is this for? How is it that you are being asked to do a problem and you don't even understand the problem, much less how to solve it?
     
  4. Feb 8, 2015 #3
    This is electronic engineer first year Bach. Its a course about Digital electronics, we just started 1 month ago. I understand logic, gates, etc. I just do not understand what I actually have to do with the question, for me its not clear enough.

    Some step on how I have to proceed would actually help me.

    How I do the table of truth of it?

    circuit returning the absolute value of a number of 3 bits // returning the absolute value??? what does this mean? How can it be negative and return the absolute value at the same time if we want the output to be signed(negative)?
    The input and output must be signed // signed? what does this actually mean, It must be negative?
    use the complement 2 // I know what is complement 2.

    This is all confusing me.
     
  5. Feb 8, 2015 #4

    phinds

    User Avatar
    Gold Member
    2016 Award

    Well, can you write out all the possible numbers using 3 digits of two's complement notation? That's the first step. Then show what each of them have to be to represent the absolute value of the same number. Can you do that?
     
  6. Feb 8, 2015 #5
    Here:
    A B C
    0 0 0 = 0
    0 0 1 = 1
    0 1 0 = 2
    0 1 1 = 3
    1 0 0 = -4
    1 0 1 = -3
    1 1 0 = -2
    1 1 1 = -1
     
  7. Feb 8, 2015 #6
    What I have to do after this?
    Thanks for helping me I really appreciate it.
     
  8. Feb 8, 2015 #7

    phinds

    User Avatar
    Gold Member
    2016 Award

    Well, you've only answered half my question. You need to put what you have in a table and add what they need to become to be the absolute value. Then you have a pair of goals ... build the adder to get the first set then use logic gates to convert it to the second set. Better still would be to figure how to just combine the two.
     
  9. Feb 8, 2015 #8
    Can you give me an example of this please "You need to put what you have in a table and add what they need to become to be the absolute value."
    I don't really understand.
     
  10. Feb 8, 2015 #9

    phinds

    User Avatar
    Gold Member
    2016 Award

    Do you know what "absolute value" IS? You have a value of +3 and you have a value for -3. How would the two relate when taking the absolute value of each?
     
  11. Feb 8, 2015 #10
    A B C Absolute value
    0 0 0 = 0 0 0 0
    0 0 1 = 1 0 0 1
    0 1 0 = 2 0 1 0
    0 1 1 = 3 0 1 1
    1 0 0 = -4 1 0 0
    1 0 1 = -3 0 1 1
    1 1 0 = -2 0 1 0
    1 1 1 = -1 0 0 1

    would this be correct?
     
  12. Feb 8, 2015 #11

    phinds

    User Avatar
    Gold Member
    2016 Award

    Good. Now can you map the input to the output. That is, skip the adder step and just write down the inputs and the outputs to your circuit.
     
  13. Feb 8, 2015 #12
    Just so I understand better.

    I have 3 intput and 3 output right?

    For example my input is A B C, and I have 1 1 1 as my input, my output should be 0 0 1?
    So to do that I have to make a logic circuit with AND / OR /NOT ?
     
  14. Feb 8, 2015 #13

    phinds

    User Avatar
    Gold Member
    2016 Award

    Yes, although what type(s) of gate(s) you use is sometimes a part of the problem statement. Since that does not seem to be the case here, then yes, I would stick to AND / OR / NOT types

    So map the 3-bit input to the 3-bit output. Do you know how to use Karnaugh maps? That would be my personal preference for the next step but it's not the only way to go.
     
  15. Feb 8, 2015 #14
    I understand Karnaugh but in my case, I don't understand how to do it since I have 3 outputs.
    Usually I do it with 1-5 inputs and 1 output only.
     
  16. Feb 8, 2015 #15

    phinds

    User Avatar
    Gold Member
    2016 Award

    Well, maybe you could do a K-map for EACH of the 3 outputs ... might that work?
     
  17. Feb 8, 2015 #16
    So for the first Karnaugh would this be right? its for the first ouput.
    6OGbttz.png
     
  18. Feb 8, 2015 #17

    phinds

    User Avatar
    Gold Member
    2016 Award

    Since you have not defined what "first output" means, I wouldn't know. Do you mean the most significant bit or the least significant bit? Do you see how that designation is more meaningful than "first output" ?
     
  19. Feb 8, 2015 #18
    ---------------Outputs
    A B C = ------1 2 3
    0 0 0 = 0-----0 0 0
    0 0 1 = 1-----0 0 1
    0 1 0 = 2-----0 1 0
    0 1 1 = 3-----0 1 1
    1 0 0 = -4----1 0 0
    1 0 1 = -3----0 1 1
    1 1 0 = -2----0 1 0
    1 1 1 = -1----0 0 1

    Output1
    jG5QEbh.png
    Equation: A/B/C

    Output2
    v6Mae0k.png
    Equation: /AB+A/BC+B/C

    Output3
    mCT4jt8.png
    Equation: C

    To put all this together I do this ? C + (/AB+A/BC+B/C) + (A/B/C)
     
    Last edited: Feb 8, 2015
  20. Feb 8, 2015 #19
    l
     
    Last edited: Feb 9, 2015
  21. Feb 9, 2015 #20

    phinds

    User Avatar
    Gold Member
    2016 Award

    Your equations at a quick glance appear (1) wrong, and (2) ridiculously complex.

    For example, #3 obviously should be 3=C

    You K-maps look nothing like what I am accustomed to. Is that how they are done these days? Here's mine.

    kmap.jpg
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Logic Gates
  1. Logic Gates (Replies: 1)

  2. Logic Gates (Replies: 8)

  3. Logic Gates Algebra (Replies: 15)

Loading...