Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Logic Gates, etc... HELP! filter_list
Author
Message
Logic Gates, etc... HELP! #1
Does any one have a /really/ simple resource for learning about logic gates and bitwise operators and shtuff like that? Im having a hell of a time grasping these concepts and its killing me lol

This is school work, and some example questions would be like

1. Complete the Truth Table for a three input NOR gate.

2. Construct a NOR gate using only NAND gates with 2 inputs.

3. Using NAND gates with 2 inputs only, construct a three input NOR gate.

Perform a logical operation on these hex values...

4. 0x17E3 AND 0xA62B =

5. 0xD36D OR 0x2A30 =

6, 0x3011 XOR 0x5EC0 =

Note that im not actually asking for the answers to these questions, these are just examples and are of no concern to me... but right now i have no idea what im supposed to be doing with the above and the lecturer and lectures did not clear this up for me, and the stuff ive found on google is going right over my head... so if any one has any ideas? id appreciate it. i have some ideas for the first 3 but the last 3... not a fucking clue haha

Thanks.

Reply

RE: Logic Gates, etc... HELP! #2
I know an excellent book Discrete maths book that will help you with the boolean logic and should answer your questions concerning truth tables.

Mathematics of Discrete Structures by Gordan J. Pace

I think its possible to download the book from www.wowebook.info

The book is set out as a pure maths book so it lacks working examples, however it should be of some use to you. I found the book easy to understand and it gives an excellent introduction to number theory and propositional logic which should be useful for your course.

Failing that I would advise searching through many text books and finding the one that works for you. I find that different approaches of text books work for different people.

Hope this helps. Sounds as if you have some hardcore logic to do.Good luck

Reply

RE: Logic Gates, etc... HELP! #3
Thanks for your input. Id like to avoid buying books though. not to mention it would be nice if i had some decent information today. Got a lab to do tomorrow that involves a list of randomly generated questions like above. I do have a basic understanding of the truth tables and the outcomes depending on input and the operator being used. But so far the instructor as specified 1 or 1 = 1, 1 or 0 = 1, etc... and that i know/get to some degree. i just cant figure out how to apply that to the situation above with hex values lol

Thanks for the suggestion though

Reply

RE: Logic Gates, etc... HELP! #4
Most Useful Links [Highly Recommended]


http://nptel.iitm.ac.in/video.php?subjectId=117106086

http://nptel.iitm.ac.in/courses/Webcours...index.html



This will be more useful :-

http://www.ee.surrey.ac.uk/Projects/Labview/

http://www.asic-world.com/digital/tutorial.html

http://www.electronics-tutorials.ws/logic/logic_1.html



Others

http://www.attano.com/video/2427-Logic-Gates

http://www.ee.surrey.ac.uk/Projects/Labview/gatesfunc/

http://www.youtube.com/watch?v=q2OBYz3K6PM

http://www.youtube.com/watch?v=tgqE_9LzqvI


(Wow this is my 1000th post, I hope this helps)
[Image: OilyCostlyEwe.gif]

Reply

RE: Logic Gates, etc... HELP! #5
(08-22-2013, 12:23 PM)Geoff Wrote: Does any one have a /really/ simple resource for learning about logic gates and bitwise operators and shtuff like that? Im having a hell of a time grasping these concepts and its killing me lol

This is school work, and some example questions would be like

1. Complete the Truth Table for a three input NOR gate.

2. Construct a NOR gate using only NAND gates with 2 inputs.

3. Using NAND gates with 2 inputs only, construct a three input NOR gate.

Perform a logical operation on these hex values...

4. 0x17E3 AND 0xA62B =

5. 0xD36D OR 0x2A30 =

6, 0x3011 XOR 0x5EC0 =

Note that im not actually asking for the answers to these questions, these are just examples and are of no concern to me... but right now i have no idea what im supposed to be doing with the above and the lecturer and lectures did not clear this up for me, and the stuff ive found on google is going right over my head... so if any one has any ideas? id appreciate it. i have some ideas for the first 3 but the last 3... not a fucking clue haha

Thanks.

Hey Geoff.
I can't provide you with links, but I can help you getting to the right answers and with specific questions. I have been working as a student assistant for exactly this subject, so I am still relatively near to the topic.

Let's start with some of these hex values for example. I will pick different ones so I won't spoil your own tasks:

0x34 AND 0xF8

In order to understand I recommend you convert these values into binaries first. The good thing about hex is that every digit represents exactly a nibble (half a byte). So for every digit in hex you have 4 digits in binary.
Some examples:

0(hex) = 0000(bin)
F(hex) = 1111(bin)

So grab a pencil and convert the values 0x34 and 0xF8 to binary.

Result:
Spoiler:
00110100
11111000

Best is to write them down like I did in the spoiler in order to perform the AND operation. Now get the truth table for AND. For every two digits in the same spot of the number you perform the AND operation.
So in this case you do (starting from left to right): 0 AND 0 is ..., 0 AND 0 is ..., 1 AND 0 is ...
Just look up the result from the truth table.

Result:

Spoiler:
00110100
11111000 AND
--------
00110000

Same principle applies for the other hex values. Just pick the right truth table.

For the other tasks, let's pick the first one:

Quote:1. Complete the Truth Table for a three input NOR gate.

What is the problem here? That there are three inputs?

Let's change the task a bit for explanation so I don't spoil your homework:

Quote:1a. Complete the Truth Table for a three input AND gate.

The usual truth table has two inputs, I call them a and b: (z is the result)

a b z
0 0 0
0 1 0
1 0 0
1 1 1

This is a AND b = z

What you want is: a AND b AND c = z
The AND is actually a binary operation, you always have only two inputs, so you need some brackets: ((a AND b) AND c) = z

This means calculate the result of a AND b and perform the AND operation on the result with c.
So you have a AND b = z1
z1 AND c = z2

This will be your table:

a b z1 c z2
0 0 0 0 ?
0 0 0 1 ?
0 1 0 0 ?
0 1 0 1 ?
1 0 0 0 ?
1 0 0 1 ?
1 1 1 0 ?
1 1 1 1 ?

And the rest is easy now. You only have to look at z1 and c to get the value of z2

Spoiler:
a b z1 c z2
0 0 0 0 0
0 0 0 1 0
0 1 0 0 0
0 1 0 1 0
1 0 0 0 0
1 0 0 1 0
1 1 1 0 0
1 1 1 1 1

I don't know if the three inputs are the point that bothered you with NOR. If it wasn't, just write me what it was.

Next task:

Quote:2. Construct a NOR gate using only NAND gates with 2 inputs.

This is what you want (NOR truth table):

a b z
0 0 1
0 1 0
1 0 0
1 1 0

This is what you can use (NAND truth table):

a b z
0 0 1
0 1 1
1 0 1
1 1 0

I could usually transform this well by only using the basic operations NOT and AND. It will help you to print out the laws of boolean logic that you can apply:
https://en.wikipedia.org/wiki/Boolean_logic
And: https://en.wikipedia.org/wiki/De_Morgan%27s_laws
These are laws you just have to learn.

a NOR b = !(a OR b) = !a AND !b

In order to transform this to using only NAND operations you need to know how to do the parts of this with NAND. This rule is interesting here:

a NAND a = !(a AND a) = !a OR !a = !a

That means a NAND gate with the same operand for both inputs will work like a NOT gate. That knowledge makes it a lot easier:

!a = a NAND a
!b = b NAND b

--> (a NAND a) AND (b NAND b)

There is only one part left that is not a NAND, but an AND.
But again, you know that a NAND a = !a, so that NAND works like a NOT gate.
And you also know (or can conclude) that !!a = a.
So that you can as well put two NAND gates behind each other to perform an AND operation. You can use the single output of one gate, split it and put it into the two inputs of the following NAND gate.

Result:
Spoiler:
((a NAND a) NAND (b NAND b)) NAND ~
~ means the first operand again

[Image: 280px-NOR_from_NAND.svg.png]

That should be all you need to know to solve this.
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: Logic Gates, etc... HELP! #6
I think i love you @Deque

No but thank you, much appreciated. Now when i walk into my lab today ill at least know what it is I need to do. What i posted are some of the pre-lab examples. and i was pretty much sitting there staring at it with not a clue what i was supposed to be doing or where to start with it lol. going through google and asking on irc was getting me nowhere haha. its funny though while the lecturer went into quite a lot of detail on logic gates, i do not ever recall him even touching on the subject of these bitwise operations? and hex values, etc

THANK YOU!

Reply

RE: Logic Gates, etc... HELP! #7
I think i love you @Deque

No but thank you, much appreciated. Now when i walk into my lab today ill at least know what it is I need to do. What i posted are some of the pre-lab examples. and i was pretty much sitting there staring at it with not a clue what i was supposed to be doing or where to start with it lol. going through google and asking on irc was getting me nowhere haha. its funny though while the lecturer went into quite a lot of detail on logic gates, i do not ever recall him even touching on the subject of these bitwise operations? and hex values, etc

THANK YOU!

Reply







Users browsing this thread: 1 Guest(s)