Prelim Engineering Preliminary Course
Prelim Engineering Preliminary Course
Engineering Mechanics
1st Law : A body will remain at rest or at constant velocity unless acted upon by
an unbalanced external force.
2nd Law: A body acted upon by an external unbalanced force will accelerate in
proportion to the magnitude of this force in the direction in which it acts.
Newton’s second law is often written in formula form as shown below.
F= ma
F-Force (N)
M=mass (kg)
A= acceleration (ms2)
Gravity: Earth exerts a gravitational force on all bodies. The gravitational force
accelerates at 9.8ms2 gravity (g) or also known as 10 ms2 gravity (g)
W= mg
W=Weight (N)
M= mass (kg)
G= acceleration due to gravity (ms2)
Example 1.1
A power drill has a mass if 1.5kg, what is its weight?
Solution:
W = mg
W = 1.5 x 10
W = 15N
Answer: the drill weighs 15N
Scalars and Vectors
Scalar quantities are those that are defined by their magnitude only e.g. distance
(20M), time (30s), mass (22.8kg). These quantities are represented by a number
and the relevant units.
Vector quantities are those that are defined by their magnitude and their
direction e.g. displacement (1 km north), force (67 N vertically down), velocity
(27ms-1 west)
1. Magnitude
2. Direction
3. Sense
4. Point of application
Simple Mechanisms
Lever
− The simplest ‘machine’ using force acting over a distance to magnify the
effort (mechanical advantage providing leverage)
Inclined Plane
− A basic ramp allows the load to be progressively raised in height
− E.g. wheel chair ramps, car ramps
Screws
− A specific kind of spiral inclined plane
− Screws magnify effort (mechanical advantage)
− Used for fine adjustments
Gears
− Like pulleys they can transfer torque from one shaft to another
− They have the advantage of allowing drive ratios to be changed
Chain Drives
− Chains are a hybrid of characteristics from gears and belt drive systems
Engineering Materials
Classification of Materials
Polymer Structures
− Thermoplastics
− Thermosets
− Thermoplastics
• Are also known as thermosoftening polymers cause they can be
resoftened and reformed
• With covalent bonds and weak secondary bonds between the chains
− Thermosets
• Cannot be resoftened by heating. Once they are formed, heat cannot
reshape them
Properties of Materials
Mechanical Properties
− Strength: withstand applied loads without failure
− Hardness: the ability of material to resist scratching, abrasion or
indentation
− Elasticity: to return to its original shape and dimension
− Stiffness: to resist elastic deformation under load
− Plasticity: to undergo some degree of permanent deformation without
rupture
− Malleability: to be hammered and rolled into thin sheets
− Ductility: to be drawn out into thin wire
Electrical Properties
− Electrical conductivity is the ability to conduct electricity. Metals and
carbon are good conductors; pure water & timber are poor conductors.
And air, glass, most polymers and ceramics are good insulators.
− Semi-conductors are materials that are manufactured to be poor
conductors
Structure of Materials
Bonding
− Noble (inert (not reactive)) gases do not react at normal temperatures
and pressures
− They have a full outer shell making them stable and not needing to bond
− They are useful for welding applications (MIG) where it is desirable to
exclude oxygen and other reactive gases
Crystal Structure
− When a material is in its liquid form there is little or no order to the
structure. As the material solidifies, however, the atoms arrange
themselves into regular crystal structure.
− Three most important structures are:
● Body centred cubic (BCC)
● Face centred cubic (FCC)
● Hexagonal close packed (HCP)
Atomic Structure:
Primary Bonds- Atoms form three types of primary bonds: ionic, covalent &
metallic. Primary bonds are the strong bonds between the tightly clustered
atoms that give any pure substance its characteristic properties.
Secondary Bonds- these are van der Waals and hydrogen bonds and are
relatively weak
Predominant bonds:
Metals- metallic
Polymers- covalent
Ceramics- ionic and/or covalent bonding
Ionic Bond
− Large differences in valance electrons usually metals and non-metals
(such as NaCI) and involves the transfer of one or more electrons
− Donor atom loses its valance electrons
− Recipient fills its outer shell
− The imbalance (electron: proton: ratio) creates an ionic charge of
attraction
Covalent Bond
− Generally occur between non-metal elements
− The strong attraction results in a sharing of valance electrons
− Covalent bonding is important in polymers
Secondary Bonds
− Molecular or van der Waals bonds
− The weak bond is produced by the concentration of –ve electrons on one
side of an atom at one particular time which leaves the rest of the atom
with a +ve charge
− The change can vary with time and can be easily be broken down but
heat, candle wax, graphite and polymers
Polymorphism
− Polymorphism or allotropy is the ability of a single substance to exist in
multiple forms or crystal structures
Crystal Structure
− Liquids have little or no ordered structure
− A crystal is a homogenous solid of definite chemical composition, with
internal order, bounded by plane faces
● BCC
● FCC
● HCP
Crystalline
● Regular ordered patterns
● All metals, majority of ceramics, some polymers and most minerals are
crystalline
Metals
Ferrous metals
● Iron is the primary constituent in ferrous metals
● Stainless steel
● The chromium reacts with oxygen to forma chromium oxide layer that
prevents further corrosion
Non-ferrous metals
● Iron is not the primary constituent metal
● Copper and Aluminium are the most commercial non-ferrous metals
Copper
● The main electrical conductor used due to high electrical conductivity
● High ductility, malleable and good corrosion resistance
● Used in electrical wiring, electrical contacts, motor windings
Brass
● Alloy of Copper & Zinc
● Can contain up to 40% zinc, but beyond that is too brittle
● All brasses are corrosion-resistant and harder then pure copper
● Good wear, conduction and corrosion resistance makes them useful for
switchgear and contacts
● Outdoor taps are cast using 60/40 brass.
Bronze
● An alloy of copper and tin
● By pressing and sintering bronze powder, a porous sleeve may be
produced
● The porous article is then impregnated with oil, graphite or
polytertrafluroethylene (PTFE or Teflon)
Aluminium
● Is a highly used metal, which has low density and excellent corrosion
resistance; low strength and as such is usually used in alloyed form.
● Aluminium foil is almost pure aluminium
● Usually aluminium is alloyed with materials like copper, zinc, magnesium,
lithium and other metals to gain excellent strength
● Is lightweight, offers strength to weight ratios better than most ferrous
alloys
Casting
● Casting Is a forming process that involves heating up a material, such as a
metal alloy and then placing it in a mould
● Moulds may be permanent moulds made of metal or they may be
disposable moulds made of sand
● Die casting uses permanent moulds and is extensively used for non-
ferrous alloy casting. Sand casting is used for a lot of ferrous alloy casting.
Rolling
● Many metals can be cast in the form of ingots or bars
● For example circular or square bar
● Rolling may be done at a high temperature (Hot rolling)- easier
● Slightly elevated temperature (cold rolling)
● Cold rolling is harder to do and the final metals structure will be stressed
and deformed, but it will have a better surface finish and be more
dimensionally accurate.
Extruding
● Extruding may be likened to squeezing toothpaste from a tube
● Aluminium alloy window frames are generally made up of extruded
sections.
Cutting
● Removal of unwanted material
● Most familiar with cutting with a hacksaw
● Turning, grinding, sawing, drilling, etc
Joining
o Various methods dependant on the material and the use of the metal
o Metallurgical:
• Electric arc welding
● Method: metal is melted by an electrode, which doubles as the filter metal
covered by flux to prevent oxidation of molten metal.
● Applications: joining thick steel sections and small runs
• Oxy-acetylene welding
● Method: metal is melted by flame and filler metal added
● Applications: joining steel fan cages
• Bronze welding
● Method: a flame heats the parent metal and bronze filler metal which is
added to the joint. There is little or no metal of the parent metal.
● Applications: low strength uses
• MIG welding
● Method: metal inert gas uses a continuous feed wire (electrode) and inert
gas (eg argon) preventing rapid oxidisation
● Applications: suited for automation and can be set up for aluminium using
a suitable feed wire and special gas mixture
• TIG welding
● Method: Tungsten Inert Gas uses a tungsten electrode (that doesn’t melt)
and a manually fed filler rod or wire
● Applications: joining aluminium and stainless steel, especially thick
sections
o Mechanical Joining
● Bolts, nuts and screws used to fasten materials together
● Hole drilling and corrosion pose issues for this form
Fabricating
● Is the process of assembling an item from various components
● Eg mild steel welded together
Polymers
− Polymers are generally solid materials made up of long molecular chains
that are created by adding or connecting smaller molecules together.
− Polymers are often termed organic, due to carbon being the primary
constituent.
− Although most polymers are synthetic, there are some natural polymers,
such as natural rubber and cellulose fibres.
− The term polymer is a very broad term; the field has a wide group of
materials, each having distinct structures and properties.
− They are used for a wide range of applications
− Synthetic polymers make up the remainder, known as “plastics”
e.g PET, HDPE, PVC, LDPE, PP, PS
− They tend to exhibit good strength-to-weight ratios
− They are generally formed into shape by moulding, rolling, extruding or
other heat forming processes
− Derived from crude oil
Ceramics
Glass:
● Transparent, brittle, most used glass is soda lime
● No atomic order- represent liquids in their atomic structure
● Maximum theoretical strength of glass is 30,000 MPs
● Ceramic glass cooktops also use special glass tops which prevent the
saucepan from directly contacting the heating element.
Gorilla Glass:
● Modern smartphones use a capacitive touchscreen that must be strong
and resistant to cracking yet be exposed so a finger can contact it.
● By an ion exchange a compression stress is a set-up in the surface, which
makes it more difficult to introduce tensile failure in the glass.
● Higher density
Composite materials
− Are made of different materials combined together to capitalise on the
desirable properties in each.
− Fibreglass as an example uses fine glass fibre with high tensile strength in
a thermosetting resin matrix. The glass fibre provides good tensile
strength while the resin provides toughness usually absent in glass.
− Concrete & timber are examples of composites.
− Properties include specific strength (strength- to weight-ratio)
− Concrete is sand, cement, aggregate (acts as a binder/glue)
Communication
Engineering Reports
• Title page
Title of the report, identifies the writer or writers, their company or organisation
and publication date
• Abstract
A clear, concise summary of the report, giving the readers a brief explanation on
the purpose of the report, too see if it is relevant for their needs
• Introduction
Introduction to the report and background information
• Main section/ procedure
• Results
• Conclusions
• Acknowledgements
• References
• Appendix
Engineers as designers
● Responsible for the original design of projects
● Are designers
● Generally design in collaboration with a team of engineers
● Research/collaboration with other professionals/people to develop ideas
and concept sketches
Engineers as communicators
● Communication is the only means by which ideas are shared
● Such as oral, written, aural, visual, intercultural
● Collaboration with others is essential
● For effective communication, engineers must have
o Oral skills
o Written skills
o Listening skills
o Visual skills
The steam (1892), electric & petrol (1896) powered lawn mowers
− First powered lawn mowers
− Steam powered were heavy (1.5 tonnes)
− Made from cast iron and still very heavy
• Engineered products such as lawnmowers, cars, etc. mean that people can
complete an activity as efficiently as possible
• Products such as engines may pollute the environment with toxic gases
Engineering Mechanics
Forces
● Non-current: this is a system of forces that are not concurrent. They may
intersect at various points or be parallel.
● Co-linear: this is a system of forces where the forces all act along the same
line
Addition of Vectors
• Unlike scalar, vector quantities must be added in a way that include their
magnitude and direction
• Up= positive. Down= Negative. Left= Negative. Right= Positive
Addition of Vectors
Couples and Force/Couples
A couple may be defined as two parallel, co-planar forces of the same magnitude
and direction but opposite sense, that produce or tend to produce rotation but
not translation.
Moments of a force
● A force causes actual or potential rotation
● Moments are clockwise (positive) and anti- clockwise (negative)
● SI unites are Nm (newton metres)
Equilibrants
− The force that will balance all other combined forces is called the equilibrant
Method 2- mathematical
− Convert all forces at point A into horizontal and vertical rectangular components
− Sum of forces in x direction= 0 (right +)
Transmissibility of a force
− A force may be relocated at ANY position along its line of action providing it has
the same magnitude and direction
Engineering Materials
Modification of materials
Through the use of various techniques, some materials may be modified in such a
way that their properties improve compared to their original state.
Heat Treatment
• Steels
− When heated until red hot, then quenched in water, the steel will become hard
but brittle
− As the carbon content increases this quenched steel will become even harder and
more brittle, this is due to a change in the structure that produces high stress-
called martensite
− Heat treatment processes for steels include:
● Annealing- Annealing is a heat process whereby a metal is heated to a specific
temperature (900o) /colour and then allowed to cool slowly. This softens the
metal, which means it can be cut and shaped more easily.
● Quenching- a type of heat-treating, is the rapid cooling of a work piece to obtain
certain material properties.
● Process Annealing- is used to counteract the hardening effects of a cold-working
operation on a metal. After significant cold work, a piece may become too brittle
to safely continue the working process. The piece may then be heated to a
temperature anywhere below its austenitizing (above 900o) temperature until
stresses have been removed from the lattice structure, and then slowly cooled to
avoid introducing new stresses.
Alloying Materials
• Done to improve desired properties
• Eg steel is alloy or carbon and iron- carbon improves strength
• Alloying can improve a materials usability in certain applications
• Alloying forms solid solutions with one metal dissolved within another
Recyclability of materials
Implications
• Many materials an engineer uses are not renewable
• Iron is readily available whilst iron ore isn’t
• Thus it’s highly important that humanity understands the importance of
recycling these materials
Engineering electricity/electronics
Basic principles
Magnetic Induction
The process by which a substance, such as iron or steel, becomes magnetized by
a magnetic field. The induced magnetism is produced by the force of the field
radiating from the poles of a magnet.
Electrical Safety
● Electricity is ‘lazy’ and will travel through the path with the least resistance
● Electrical systems are now being designed to remove the chance of human
contact with live wires
● A lot of domestic appliances are double insulated- prevents the user coming into
contact with anything live
Fundamentals of AC and DC currents
DC = direct current
● Charge moves in one direction
● Direct positive to negative movement
AC = alternating current
● Charge moves back and forth periodically.
● Directions changes 50 times per second.
Electric Motors and Generators
● Electric motors convert electrical energy into mechanical energy
● Generators do the opposite of the above
● Some electric motors run AC, some run DC
● Electric motor passes current through a rotating coil; the coil has a magnetic field
induced around it, which will react with the magnetic field surrounding it and
tends to produce a force that rotates the coil.
Communication
Dimensioning
Material lists
• Often is necessary for drawings to use material lists
• Situated at the bottom right corner and are a list of the parts used, the
amount required and the material it’s made of
• Important to orthogonal drawings
Drum Brake
• 1902- Works with an internally expanding drum brake
• Initially drum brake shoes were opened by lever systems and a cam but as
car speeds increased, hydraulically operated pistons operated the shoes
Disc Brake
• 1902- rotating disc is connected to axle. Connected to the suspensions is a
backing plate with a caliper attached. This caliper wraps over the disc and
houses two pads that are forced laterally against the disc by a hydraulically
operated piston
ABS
• 1929- Anti-lock braking system (ABS) is an automobile safety system that
allows the wheels on a motor vehicle to maintain tractive contact with the
road surface according to driver inputs while braking, preventing the wheels
from locking up (ceasing rotation) and avoiding uncontrolled skidding.
Drum Brakes
• Improved stopping power- car can travel faster whilst stopping safely
• Increased speed means potentially less safe; cars need to adapt their safety
features to these changes
• Four wheel brakes mean safer cars
• Drum brakes handle better in contrast to contracting band brakes in poor
weather conditions
Disc brakes
• Cars more effective at stopping at higher speeds
• Improved heat dissipation over the drum brakes means safer continual
braking effort (eg going down a hill)
• Easily adapted to computer controls (eg ABS)
• Prior to 1902, brake linings were leather or woven cotton with poor thermal
stability and low coefficient of friction
• 1902 found asbestos lining introduced; greater stability at higher
temperatures (when brakes become hot, the frictional force is reduced)
• Although major health problems were associated with asbestos- potentially
causes lung cancer through inhalation of broken fibres
• Care should now be taken when acting with this material
• Tensile stresses are those produced by forces trying to pull apart or lengthen
a material
• Compressive stresses are those produced by forces trying to compress or
reduce the length of a material
• Shear stresses are those produced by forces trying to slide one part of the
material over the other.
● Energy
● Has the same SI units as work ie the joule
● Definition: an objects ability to do work
● Exists as mechanical, chemical, electrical heat and atomic
Any PE present plus any KE present will equal the final KE and PE unless there is
work done
PE1 + KE1 +_W= PEf + KEf
Formula:
P=P0 + pgh
P =pressure at depth
Po = Pressure at the top
P= density of the fluid (kgm-3)
G= acceleration due to gravity (ms-2)
h= depth below top (m)
Blaise Pascal
‘pressure applied to a confined liquid is transmitted equally throughout the
liquid’
P=f/a
P=pressure
F=force (N)
A= area
By pressing the pedal, the piston is forced into the cylinder so increasing the
pressure in the master cylinder. This increase in the master cylinder creates an
increase in pressure in all brake callipers, forcing the pads against the discs and
so applying the brakes.
Hydrostatic Pressure
Engineering Materials
Materials for braking systems
Steels-
What is steel?
o An important alloy. It is a binary alloy of iron and carbon, with no more
than 2% carbon. Steels are classified according to their carbon content
What is the maximum carbon content?
o 2%
o As steel cools it changes its structure.
o The amount of carbon present determines at what temperature these
changes occur.
What is Austenite?
o When a steel is heated to 1000oc it becomes austenite in structure. It is a
constituent of some forms of steel. Obtains an FCC structure.
Cast Irons-
The primary difference between steel and cast iron is what?
o Carbon content. Steel never contains more than 2%, whilst cast iron
contains 2.5-5%.
What are some desirable properties of cast iron?
o Heat resistance, relatively cheap, compressive strength and rigidity, easily
machined, good fluidity
How can a metal with such high carbon content be made to not be so extremely
hard and brittle?
o Varying the amounts of alloying elements present or through heat
treatment processes can alter the structure.
White Cast iron
o What is it and where might it be used?
o Hard and brittle iron is a hard and brittle iron formed due to fast cooling
or low silicon. The structure is pearlite or cementite. Used for wear
resistance
Grey cast iron
o What is Grey cast iron?
o Is the result of high silicon content and is ‘grey’ due to its colour of its
structure.
What is the ingredient and what does it do?
o It has graphite in the form of flakes. These flakes are essentially voids in
the structure, which makes grey cast iron weak in tension, although
strong in compression
The graphite forms what shape?
o Flakes
What properties do grey cast irons have in regards to the following properties:
o Tension -Weak
o Compression -Strong
o Machinability –Easily machined
o Vibration characteristics –Excellent vibration dampening characteristics
Composites-
Composite materials are most often formed by the combination of two or more
materials to achieve properties that are superior to those of its individual
constituents.
Communication
Pointers:
o Make drawings large; the larger the more accurate
o Be accurate in transferring angles to force diagram
o Ensure all vectors are drawn to correct scale
o Pictorial:
− Oblique
− Isometric
o Orthogonal:
− Dimension it fully
− Not too many dimensions on one view
− Don’t place redundant dimensions
− Front view is drawn in the direction of the arrow given on the pictorial
o Exploded:
− Used to illustrate various parts that constitute an assembly
− Usually labelled
Topic 4: Biomedical Engineering
Career Prospects
o Biomedical industry (field) does not offer the same amount of jobs as such as
civil engineering
o Although, job prospects do exist (technologies develop- field expands)
o Improve the quality of most peoples lives- earn great respect and praise
o In contrast, religious or cultural groups do not support the replacement of
limbs with artificial items – dilemma with patient and engineer
Technologies unique to the profession
Engineers as managers
o Immense impact on peoples lives; prior to 1960 a failed heart meant death/a
failed hip meant individuals confined to a wheelchair
o Biomedical engineering opens new options- enables people to hear, feel, see and
move again. These are of immeasurable value to individuals
o Responsible for the precision design of equipment used in surgical procedures
and medical surveillance and imagery
o Development of heart monitors, various scanners (CAT, MRI, nuclear cameras)
and surgical equipment is of paramount importance
Engineering Mechanics and Hydraulics
Orders of levers
Levers are one of the simplest machines used by engineers, yet they are the basis
for many more complex machines. The operation of levers can be divided into
three forms or orders of levers. These include:
o Second-Order levers:
These levers have the load between the pivot point and the effort (force coming
up). Examples include a wheelbarrow, a brake pedal, a bottle opener and a foot
pump. With this type of lever the effort is always less than the load.
• mechanical advantage, velocity ratio and efficiency
The higher the medical advantage, the lower the effort must be for a given load. If
mechanical advantage is below one, than we have a mechanical disadvantage. A
large mechanical advantage would seem like the best option but there are times
when a low mechanical advantaged is a better choice. A good example of this
includes a brake lever on a bike.
The higher the VR the greater the distance that the user must move. Unlike the
Mechanical advantage, the velocity ratio is not affected by friction and system
losses. If a machine is perfectly efficient, then MA will equal VR. The lower the
velocity ratio the greater the effort that is required. In the example on bike brake
levers, we can say that the operating the lever at the end gives a high velocity
ration, while operating near the pivot point gives a low velocity ratio.
o Efficiency:
An ideal machine is one that is 100% efficient. This means all energy put into the
machine is used. However this never occurs. There is always some type of
energy loss (usually a result of friction) that results in the efficiency being below
the ideal 100%. In the case of levers there may be friction in the pivots or the
lever may bend slightly. VR is always the same irrespective of efficiency, since
there is no change in the distances of the effort and the load. But Mechanical
Advantage is affected, by a less than ideal efficiency; thus the Mechanical
Advantage will always be less than the VR for machines with efficiencies below
100%. The percentage efficiency I found by the following formula:
Engineering Materials
o Forming methods
– Forging
• Forging is the process of shaping a metal with forceful blows. It may be done
with the metal hot (hot forging) or cold (cold forging or pressing).
• Hot forging is carried out above the recrystallization temperature. The
simplest type of forging is that which a blacksmith does against an anvil.
• Forging may draw out a metal while reducing its cross sectional area
(drawing), reduce its length while increasing its cross sectional area
(upsetting) or it may force the metal into dies to take the required shape, as
in drop forging.
• One advantage of forging is the grain flow within the metal will conform to
the shape of the article, thus increasing strength in the direction of the axis
item.
− Crystal Structure:
−
The crystal structure refers to how the atoms are arranged in a solid material. If
the material is amorphous, there will be no regular structure, but if it is a
crystalline then the way those atoms are structured has an effect on the
materials properties. Amorphous materials tend to be brittle, but also display
good strength and stiffness along with unique physical properties. If the
structure is crystalline, it may be one of many structures. Metal crystals may be
faced centred cubic (FCC), body centred cubic (BCC), hexagonal close packed
(HCP).
− Microstructure:
When a material is viewed under a microscope its microstructure is revealed.
Many features may be shown under such examinations. Phases are chemically
stable single homogenous areas in an alloy. They may even be seen; for example
in steel; ferrite and cementite are two phases that will be seen. Inclusions and
impurities are shown in that structure also.
− Macrostructure:
The macrostructure of a material is that which is seen with the naked eye, or
under a magnifying glass. The macro structure of a material is highly dependent
on the way it is manufactured. Cast items may display features such as
inclusions, shrinkage, stress raisers and columnar grain growth (elongated
parallel grains) while forged items may display grain flow, grain growth or grain
refinement, and a welded item may show grain growth, gas porosity or
inclusions. Some of these features are desirable such as grain glow, but stress
raisers and inclusions are not.
o Ferrous alloys:
− Because of the criteria previously listed plain carbon steels see relative little
use in biomedical applications. Ferrous alloys with elevated contents of such
elements as nickel and chromium are generally required creating what are
generally known as stainless steel.
o Stainless steels:
− Stainless steels are probably the best-known high alloy steels, yet most
students are probably unaware that there are five different types. The
primary stainless steels for biomedical engineering are austenitic stainless
steels.
Titanium Alloys
Electricity/electronics
Ohms Law
o Ohms Law relates voltage (v), current (I) and resistance (R) is included, then
I= V/R. Using the Ohm’s law triangle: to find the equation for any term, cover
the term with your finger- the equation will be the other two terms.
o For example if you cover the letter V, you are left with I x R so V= I x R and so
on.
Series and parallel circuits
Series:
● There is only one current pathway.
● Current is the same throughout the whole circuit
● If a series circuit is broken at any point then the electricity cannot flow through
it.
● Current remains constant (IT = I1 = I2 = I3) and voltage varies (VT=V1+V2+V3).
● RT = R1 + R2 + R3 …
Parallel:
Parallel Series
VT= V1 = V2 = V3 VT= V1 + V2 + V3
IT=I1 + I2 + I3 IT=I1 = I2 = I3
Power Source
Microcircuits/integrated circuits
Digital Technology
Logic Gates