Uploaded by uthyschool1660

Input and Output devices, Sensors, & Number types

advertisement
Input Devices
•
Input devices are the devices we use to capture data.
•
Input devices converts inputs into digital data which can be processed.
•
For conventional computer systems, such as desktop computers and laptops, the most
common input devices are the mouse and the keyboard.
•
There are a wide range of input devices used in more specialist computer systems such
as scanners and sensors.
Output Devices
•
An output device shows the results of the processing in a way humans can understand
•
In a general-purpose computer system, the main output device is the monitor/screen
•
Other output devices include projectors, printers, speakers and actuators
Sensors
•
Sensors are input devices.
•
They measure a physical property of their environment such as light levels,
temperature or movement.
•
Sensors can be used for monitoring and controlling systems
o
A monitoring system tracks the state of a system, it gathers data and may
issue warning messages.
o
A control system will control the system based upon the input from sensors.
o
For example, if the water temperature in a fish tank fell below the acceptable
level, a control system would start up a heater. The system will then continue to
check the water temperature readings and when they are within the acceptable
range it will switch off the heater.
▪
This process of the outputs affecting the following set of input values
received from the sensors is called feedback loops.
▪
Some examples of sensors and their uses are given below.
Sensor type
Acoustic
What it measures
Sound levels
Gas
Presence of a gas like
carbon monoxide
Levels of water vapour
Detecting motion or a heat
source
Humidity
Infrared (IR)
Light
Moisture
Light levels
Presence and levels of
moisture
Acidity or Alkaline
pH
Pressure
Gas liquid or physical
pressure
Distance
Proximity
Temperature
Temperature in Celsius,
Fahrenheit or Kelvin
Typical use
• To detect changes in sound levels of industrial machinery
• To monitor noise pollution
• To detect suspicious sounds (In security systems)
• Detect levels of gas in confined spaces
• Detect gas levels when fixing gas leaks
• Monitoring the humidity in greenhouses
• Security systems detecting intruders who break the IR beam.
• Measures heat radiation of objects (used by emergency services
to detect people)
• Automatically switching on when it is dark (usually on streetlights)
• Monitoring moisture in soil
• Monitoring dampness in buildings
• Monitoring soil to ensure optimum growing conditions
• Monitoring pH levels in chemical processes
• Monitoring tyre pressure
• Monitoring pressure in pipes during manufacturing process
• Monitoring position of objects in robotics
• Used in safety systems to prevent objects colliding
• Used to maintain temperature in swimming pools
• Used to control temperature in chemical processes
Converting Binary digits to denary (decimal) digits
Example: convert 173 to a binary digit
o Write down the powers of 2 in binary from right to left, starting with 20 (1), 21 (2), 22 (4),
23 (8), continue until you reach 128
128
64
32
16
8
4
2
1
o
Starting from the column on the very left, Check if 128 is less than or equal to 173, if it is, write
1, a row below 128, and subtract 173 by 128, if it isn’t, write 0, a row below 128.
o
Then check if 64 is less than or equal to 45, if it is, write 1, a row below 64, and subtract 45 by
64, if it isn’t, write 0, a row below 64.
o
Then check if 32 is less than or equal to 45, if it is, write 1, a row below 32, and subtract 45 by
32, if it isn’t, write 0, a row below 32.
o
Once again, check if 16 is less than or equal to 13, if it is, write 1, a row below 16, and subtract
13 by 16, if it isn’t, write 0, a row below 16.
o
Then check if 8 is less than or equal to 13, if it is, write 1, a row below 8, and subtract 13 by 8, if
it isn’t, write 0, a row below 8.
o
Next, check if 4 is less than or equal to 5, if it is, write 1, a row below 4, and subtract 5 by 4, if it
isn’t, write 0, a row below 4.
o
Then, check if 2 is less than or equal to 1, if it is, write 1, a row below 2, and subtract 1 by 2, if it
isn’t, write 0, a row below 2.
o
Finally, check if 1 is less than or equal to 1, if it is, write 1, a row below 1, and subtract 1 by 1, if
it isn’t, write 0, a row below 1.
128
64
32
16
8
4
2
1
1
0
1
0
1
1
0
1
•
Check your working by adding together all column headings with a 1 underneath
(128+32+8+4+1=173)
•
Read the binary digits from left to right to get the binary equivalent of 173.
10101101

Remember to write the base 2 for all binary digits, for example 101011012
Converting denary (decimal) digits to binary digits
Example: convert 01100110 to a denary digit
o Write down the powers of 2 in binary from right to left, starting with 20 (1), 21 (2), 22 (4),
23 (8), continue until you reach 128
o Then, write down 1 or 0 to their corresponding digit to get a table similar to this:
128
64
32
16
8
4
2
1
0
1
1
0
0
1
1
0
o Lastly, add up all column headings with a 1 underneath (64 + 32 + 4 + 2)
o Read the digit you got from the calculation to get the denary equivalent of
01100110. 102

Remember to write the base 10 for all denary digits, for example 10210
Converting binary digits to hexadecimal digits
Example: Convert 110 1110 to hexadecimal digits
o If not done already, spilt the digits into segments of 4 digits each


The segmentation has to start from the right-hand side
(if there is a segment with 3 digits, add a 0 to the left-hand side).
o Write down a chart of the digits 1, 2, 4, 8, on one column, and the 4 digits (of ones and
zeroes) in the second column, like shown below.
8
0
4
2
1
8
4
2
1
1
1
0
1
1
1
0
o Finally convert those digits to its corresponding hexadecimal value (table is given below
for reference)
o 4+2=6
8 + 4 + 2 = 14 (“E” in hexadecimal value)

If you want to convert from hexadecimal to binary, reverse the steps given above
Binary
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Denary (Decimal)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Hexadecimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Converting denary (decimal) digits to hexadecimal digits
Example: Convert 173 to hexadecimal digits
o You can change 173 to binary digits, and convert that to hexadecimal digits, like shown
below
128
1
64
0
32
1
16
0
8
1
4
1
2
0
1
1
o Then convert the binary digits to denary as explained above
1010 1101
A
D

If you want to convert from hexadecimal to denary, reverse the steps given above
Binary Addition
•
•
The binary adding rules are:
o
0+0=0
o
0+1=1
o
1 + 1 = 10 (The 1 is carried into the next column on the left)
o
1 + 1 + 1 = 11 (The 1 is carried into the next column on the left)
Two examples are given below
111
10100101
10010101
+ 01101010
+ 01101010
100001111
11111111
Adding binary walkthrough
•
In this example, we start by adding from the left-hand side: 0 + 0 = 0, which we write
down in the sum column
•
We then move to the next column to the left and add the two bits and the carryover
from the previous column: 1 + 1 + 0 = 10
•
We write down the remainder of the sum (i.e., 0) in the sum column and carry over the
digit (i.e., 1) to the next column.
•
We repeat this process for the next two columns, and end up with the sum 101110000
Download