luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a...

7
Logic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break them down to the individual gate. Every program and device uses these logic gates to transfer data from one another. Below are some logic gates and how they work. AND Gate The AND Gate works only when both switches are true as show below. Input A Input B Output 0 0 0 1 0 0 0 1 0 1 1 1 This truth table shows us how the And Gate works, 0 represents false and 1 is true. So from this we know that the AND Gate can only output data if both inputs are true. OR Gate The OR Gate works when any input is switched on. Then only time it won’t output is when both inputs are false. Input A Input B Output 0 0 0 1 0 1

Transcript of luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a...

Page 1: luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break

Logic Gates and How They Operate

Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break them down to the individual gate. Every program and device uses these logic gates to transfer data from one another. Below are some logic gates and how they work.

AND Gate

The AND Gate works only when both switches are true as show below.

Input A Input B Output0 0 01 0 00 1 01 1 1

This truth table shows us how the And Gate works, 0 represents false and 1 is true. So from this we know that the AND Gate can only output data if both inputs are true.

OR Gate

The OR Gate works when any input is switched on. Then only time it won’t output is when both inputs are false.

Input A Input B Output0 0 01 0 10 1 11 1 1

This truth table shows us that no matter what if there is at least one true input there will be an output.

Page 2: luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break

NOT Gate

NOT Gate works as an inverter, it will invert anything it is attached to e.g. if the NOT Gate is attached to the end of a AND Gate then it will only stop outputting if both gates are true.

Input A Output0 11 0

This truth table shows when there is no input there will be an output. So when there is an input then there is no output.

Automated Lighting System

Here we see a truth table for the Automatic Lighting that will be placed on Undermine Robotic system. We have a manual switch that counters the output, so if there is an output and you make the switch true then there will be no output.

Manual Switch Timer Light Sensor Output0 0 0 01 0 0 10 1 0 00 0 1 01 1 0 11 0 1 10 1 1 11 1 1 0

This is what the finished Logic Circuit looks like. We have used 3 inputs labelled Manual Switch, Timer and Light Sensor. We have 1 AND Gate connected to Timer and Light Sensor. Lastly we have a XOR Gate which is like an OR Gate except it can only have 1 input to create an output.

Page 3: luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break

Automated Lighting System

Here we have a second draft of the Automatic Lighting System. We have used the exact same layout as before except there is a Motor input and the AND Gate has been Enhanced so it can have 3 Inputs.

Here we have the final draft of the Automated Lighting. We have scrapped the idea of a timer and instead added a battery life detector. We have used a NOT Gate this time as well for the Battery life as when the battery is low it will be true turning off the system. Other than that it is the same layout as above.

Page 4: luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break

Mathematical Functions

In robotC we can use distances instead of time, to do this we have to first get some results. These include set time and the distance covered in that time. From that we can make a graph like the one below.

Here we can see that 1 second equals 150 mm or 1.5 cm. The equation for this is Y=0.15X. Now from this we can begin to create the function itself. When you go to write your code it should look like the code below.

0 1 2 3 4 5 60

100

200

300

400

500

600

700

800

Distance(MM)

Distance(MM)

Page 5: luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break

Quadratic Functions

In order to work out how long it will take to cover a certain area we need to use a quadratic function, we can use excel for this as we can create a graph displaying the results.

Here we have what the finished product looks like. To work out this we had to know how long it took for a 10x10 area to be covered. From then we can add more on. It is best shown like below.

Each square is 10 x 10

Page 6: luxien.weebly.com · Web viewLogic Gates and How They Operate Logic Gates sound hard and can look a mess but as the name suggests they are logical and do make sense when you break

So if it takes 5 minutes for a 10x10 area then we can simply add the extra 10s to the 20x20. So for 20 x 20 there is 4 lots of the 10 x 10’s taking 5 minutes each, so 4 * 5 gives us 20 minutes for an area of 20 x 20. So to do 30 x 30 we do 9 *5 as there is now 9 squares for the 30 x 30 = 45 minutes to complete.

Quadratics are used in everyday use like the example above, they are used in Aerodynamics. With Aerodynamics there are 4 key factors that affect the aerodynamics of an object. Lift, weight, thrust and drag. All of these factors make up a quadratic formula that allows us to determine the air flow of say a plane or a F1 racing car.

Another place quadratics are commonly used are in is stopping distance for cars. It is important to know how far you will travel before you come to a complete stop. To do this they have to know the speed of the vehicle, and how effective the brakes are. Once we know that we can then work out how far we travel before a complete stop at say 30 MPH.

The Graph below shows the acceleration over time.

The formula for this Y=2.5*X+0. We got this by 50/20 as they are the easiest to divide by.