NUMBER SYSTEM Decimal Number System Binary Number System Octal Number System Hexadecimal Number System
Decimal Number System The decimal system is composed of 1- numerals or symbols (Deca means 10, that is why this is called decimal system). These 10 symbols are 0,1,2,3,4,5,6,7,8,9 ; using these symbols as digit as number, we can express any quantity. The decimal system, also called the base-10 system
Binary Number System Binary System , there are only two symbols or possible digit values, 0 and 1. This base-2 system can be used to represent any quantity that can be represented in decimal or other number systems. The Binary system is also a positional-value system, wherein each binary digit has its own value expressed as a power of 2.
Octal Number System The Octal number system is very important in digital computer work. The octal number system has a base of eight, meaning that it has eight unique symbols : 0,1,2,3,4,5,6,7 . Thus each digit of an octal number can have any value from 0 to 7. The octal system is a positional value system, wherein each octal digit has its own value expressed as a power of 8.
Hexadecimal Number System The Hexadecimal System uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 – 9 and the letter A, B, C, D, E & F as the 16 digit symbols. Hexadecimal is a positional value System has its own value expressed as a power of 16.
NUMBER CONVERSIONS CONVERSIONS WITH BINARY Decimal To Binary Decimal Fraction To Binary Binary To Decimal Binary Fraction To Decimal
Decimal To Binary To converting decimal to Binary we use Repeated division method. In this the no. is successively divide by 2 and its remainder recorded. For Example convert decimal to Binary 43 10 2 43 2 21 1 2 10 1 2 5 0 2 2 1 2 1 0 1 1 CONVERSIONS WITH BINARY WRITE IN THIS ORDER From Down to Up Your Answer 43 10 = 101011 2
Decimal Fraction To Binary To Convert a decimal fraction into binary, multiply the decimal fraction by the base that’s 2. Do untill you will get zero at fractional part. For Example Convert 0.375 10 to Binary Integer Part Multiply(fractional part)0.375 * 2 = 0.750 0 0.75 * 2 = 1.50 1 0.50 * 2 = 1.00 1 Your Answer is 0.375 10 = 0.011 2 Write From Up to Down CONVERSIONS WITH BINARY
Binary To Decimal To convert Binary to Decimal, Add positional weights or values with power of 2 start from right side. For Example Convert 11011 to Decimal. 2 4 2 3 2 2 2 1 2 1 * 2 4 + 1 * 2 3 + 0 * 2 2 + 1 * 2 1 + 1 * 2 = 16 + 8 + 0 + 2 + 1 = 27 10 (decimal) 1 1 1 1 CONVERSIONS WITH BINARY
Binary Fraction To Decimal To find binary fraction, take the sum of products of each digit value (0 – 1) and its positional value. Starts from left side. For Example convert 0.0101 to Decimal. 2 -1 2 -2 2 -3 2 -4 0 * 2 -1 + 1 * 2 -2 + 0 * 2 -3 + 1 * 2 -4 = 0 + 0.25 + 0 + 0.0625 0.0101 2 = 0.3125 10 (decimal) CONVERSIONS WITH BINARY . 0 1 1
NUMBER CONVERSIONS CONVERSIONS WITH OCTAL Decimal To Octal Decimal Fraction To Octal Octal To Decimal Octal To Binary Binary To Octal
Decimal To Octal A decimal integer can be converted to octal by repeated-division method with division factor of 8. Example Convert 266 10 to Octal remainder 8 266 2 8 33 1 8 4 4 266 10 = 412 8 WRITE IN THIS ORDER From Down to Up CONVERSIONS WITH OCTAL
Decimal Fraction To Octal To convert Decimal fraction into Octal, multiply fractional part with 8 till you get fractional part 0. Example : convert 0.375 10 to Octal Integer Part 0.375 * 8 = 3.0 3 🡺 0.375 10 = 0.3 8 CONVERSIONS WITH OCTAL Write From Up to Down
Octal To Decimal It can easily converted into decimal by multiplying each octal digit by its positional weight. For Example 372 8 to Decimal 8 2 8 1 8 3 * 8 2 + 7 * 8 1 + 2 * 8 = 3 * 64 + 7 * 8 + 2 * 1 = 250 10 CONVERSIONS WITH OCTAL 3 7 2
Octal To Binary To convert Octal To Binary is easy. This converting is performed by converting each octal digit to its 3 bit binary. Possible digits converted as indicated in Table Example : 472 8 to binary From table , 4 = 100 , 7 = 111 & 2 = 010 We get 472 8 = 100111010 2 CONVERSIONS WITH OCTAL Octal Digit 1 2 3 4 5 6 7 Binary 000 001 010 011 100 101 110 111
Binary To Octal Its simply the reverse of octal to binary. Make the three bits group starting from LSB. Then convert it with using Table For Example: 11010110 2 to Octal Make group of three 011 , 010 & 110 011 = 3 , 010 = 2 & 110 = 6 11010110 2 = 326 8 CONVERSIONS WITH OCTAL Octal Digit 1 2 3 4 5 6 7 Binary 000 001 010 011 100 101 110 111 Add Zero To Make it group of 3 bit.
NUMBER CONVERSIONS CONVERSIONS WITH HEX Decimal To HEX Decimal Fraction To HEX HEX To Decimal HEX To Binary Binary To HEX
Decimal To HEX A decimal integer can be converted to hex by repeated-division method with division factor of 16. Example Convert 266 10 to Hex remainder 16 423 7 16 26 A 16 1 1 423 10 = 1A7 16 10 10 = A 16 WRITE IN THIS ORDER From Down to Up CONVERSIONS WITH HEX
Decimal Fraction To Hex To convert Decimal fraction into Hex, multiply fractional part with 16 till you get fractional part 0. Example : convert 0.03125 10 to Hex Integer Part 0. 03125 * 16 =0.5 0 0. 5 * 16 = 8.0 8 🡺 0.03125 10 = 0.08 16 CONVERSIONS WITH HEX Write From Up to Down
HEX To Decimal It can easily converted into decimal by multiplying each Hex digit by its positional weight has power of 16. For Example 2AF 16 to Decimal 16 2 16 1 16 2 * 16 2 + A * 16 1 + F * 16 = 2 * 256 + 10 * 8 + 15 * 1 = 607 10 CONVERSIONS WITH HEX 2 A F Decimal Hex 1 1 2 2 3 3 4 4 5 5 6 6 7 7 Decimal Hex 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F
HEX To Binary To convert Hex To Binary is easy. This converting is performed by converting each hex digit to its 4 bit binary. Possible digits converted as indicated in Table Example : 3A6 16 to binary From table, 3 = 0011 , A = 1010 & 6 = 0110 We get 3A6 16 = 001110100110 2 CONVERSIONS WITH HEX Binary Hex 0000 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 Binary Hex 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F
Binary To HEX Its simply the reverse of Hex to binary. Make the four bits group starting from LSB. Then convert it with using Table For Example: 1010111010 2 to Hex Make group of four 0010 , 1011 & 1010 0010 = 2 , 1011 = B & 1010 = A 1010111010 2 = 2BA 16 CONVERSIONS WITH HEX Add Zero to Make it group of 4 bit. Binary Hex 0000 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 Binary Hex 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F
Data Acquisition
PC-based Data Acquisition System Overview In the last few years, industrial PC I/O interface products have become increasingly reliable, ccurate and affordable. PC-based data acquisition and control systems are widely used in industrial and laboratory applications like monitoring, control, data acquisition and automated testing. Selecting and building a DA&C (Data Acquisition and Control) system that actually does what you want it to do requires some knowledge of electrical and computer engineering. • Transducers and actuators • Signal conditioning • Data acquisition and control hardware • Computer systems software
Data Acquisition System Introduction I A data acquisition system consists of many components that are integrated to: Sense physical variables (use of transducers) Condition the electrical signal to make it readable by an A/D board
Data Acquisition System Introduction II Convert the signal into a digital format acceptable by a computer Process, analyze, store, and display the acquired data with the help of software
Data Acquisition System Block Diagram
Transducers Sense physical phenomena and translate it into electric signal. Displacement Level Electric signals ON/OFF switch Temperature Pressure Light Force
Transducers and Actuators A transducer converts temperature, pressure, level, length, position, etc. into voltage, current, frequency, pulses or other signals. An actuator is a device that activates process control equipment by using pneumatic, hydraulic or electrical power. For example, a valve actuator opens and closes a valve to control fluid rate.
Signal Conditioning Signal conditioning circuits improve the quality of signals generated by transducers before they are converted into digital signals by the PC's data-acquisition hardware. Examples of signal conditioning are signal scaling, amplification, linearization, cold-junction compensation, filtering, attenuation, excitation, common-mode rejection, and so on.
Signal Conditioning One of the most common signal conditioning functions is amplification. For maximum resolution, the voltage range of the input signals should be approximately equal to the maximum input range of the A/D converter. Amplification expands the range of the transducer signals so that they match the input range of the A/D converter. For example, a x10 amplifier maps transducer signals which range from 0 to 1 V into the range 0 to 10 V before they go into the A/D converter.
Signal Conditioning Electrical signals are conditioned so they can be used by an analog input board. The following features may be available: Amplification Isolation Filtering Linearization
Data Acquisition Data acquisition and control hardware generally performs one or more of the following functions: analog input, analog output, digital input, digital output and counter/timer functions.
Analog Inputs (A/D) Analog to digital (A/D) conversion changes analog voltage or current levels into digital information. The conversion is necessary to enable the computer to process or store the signals.
Analog Inputs (A/D) The most significant criteria when selecting A/D hardware are: 1. Number of input channels 2. Single-ended or differential input signals 3. Sampling rate (in samples per second) 4. Resolution (usually measured in bits of resolution) 5. Input range (specified in full-scale volts) 6. Noise and nonlinearity
Analog to Digital (A/D) Converter Input signal Sampling rate Throughput Resolution Range Gain
A/D Converter: Input Signal Analog Signal is continuous Example: strain gage. Most of transducers produce analog signals Digital Signal is either ON or OFF Example: light switch.
A/D Converter: Sampling Rate Determines how often conversions take place. The higher the sampling rate, the better. Analog Input 4 Samples/cycle 8 Samples/cycle 16 Samples/cycle
A/D Converter: Sampling Rate Aliasing. Acquired signal gets distorted if sampling rate is too small.
A/D Converter: Throughput Effective rate of each individual channel is inversely proportional to the number of channels sampled. Example: 100 KHz maximum. 16 channels. 100 KHz/16 = 6.25 KHz per channel.
A/D Converter: Range Minimum and maximum voltage levels that the A/D converter can quantize Ranges are selectable (either hardware or software) to accurately measure the signal
A/D Converter: Resolution
Analog Outputs (D/A) The opposite of analog to digital conversion is digital to analog (D/A) conversion. This operation converts digital information into analog voltage or current. D/A devices allow the computer to control real-world events. Analog output signals may directly control process equipment. The process can give feedback in the form of analog input signals. This is referred to as a closed loop control system with PID control. Analog outputs can also be used to generate waveforms. In this case, the device behaves as a function generator.
Analog Outputs (D/A)
Data Acquisition Software It can be the most critical factor in obtaining reliable, high performance operation. Transforms the PC and DAQ hardware into a complete DAQ, analysis, and display system. Different alternatives: Programmable software. Data acquisition software packages.
Programmable Software Involves the use of a programming language, such as: C++, visual C++ BASIC, Visual Basic + Add-on tools (such as VisuaLab with VTX) Fortran Pascal Advantage : flexibility Disadvantages : complexity and steep learning curve
Data Acquisition Software Does not require programming. Enables developers to design the custom instrument best suited to their application. Examples: TestPoint, SnapMaster, LabView, DADISP, DASYLAB, etc.
How Computers Represent Numbers Friday, Week 5
Binary Code A series of 1’s and 0’s Place value is in powers of 2
The Decimal System Analyze the number 2,473 2,473 = 2 * 1000 + 4 * 100 + 7 * 10 + 3 *1 2,473 = 2 * 10^3 + 4 * 10^2 + 7 * 10^1 + 3 * 10^0 Each position in our number represents a different power of 10 Decimal is a base 10 system
Hexadecimal System Base-16 system Needs digits 0 through 15 - we don’t have numbers for 10 - 15. We use the letters A - F to represent the numbers 10 - 15.
Exercise What would 3B in hexadecimal be in decimal? 3B = 3 * 16 ^ 1 + 11 * 16 ^ 0 3B = 3 * 16 + 11 * 1 3B = 48 + 11 3B = 59
More on hexadecimal 4 binary digits equal one hexadecimal number 0101 (binary) = 5 (hex) 1101 (binary) = D (hex) 1011101 (binary) = 93 (decimal) = 5D (hex)
Decimal to Binary Divide by 2 and keep track of the remainders. 39 (decimal) = 100111 (binary) 39/2 = 19 Rem 1 19/2 = 9 Rem 1 9/2 = 4 Rem 1 4/2 = 2 Rem 0 2/2 = 1 Rem 0 1/2 = Rem 1
Exercise Convert 89 (decimal) to binary 89 (decimal) = 1011001 (binary) 89/2 = 44 R 1 44/2 = 22 R 0 22/2 = 11 R 0 11/2 = 5 R 1 5/2 = 2 R 1 2/2 = 1 R 0 1/2 = R 1
Why use binary? Binary uses more digits than decimal, so why do we use it? Electronic hardware can either be ‘on’ or ‘off’ - nothing in between. Binary fits this pattern - ‘on’ state is 1 in binary and ‘off’ state is 0 in binary.
Numeric Representation of Letters and Digits In a computer, letters and digits are represented by numeric codes. Example Code: What does this say? 8 9 3 12 1 19 19 A B C D E F G H I J K L M 1 2 3 4 5 6 7 8 9 10 11 12 13 N O P Q R S T U V W X Y Z 14 15 16 17 18 19 20 21 22 23 24 25 26
ASCII and Unicode ASCII (American Standard Code for Information Interchange) - 7 bit code that represents commony used English characters. Unicode - Newer 16 bit code that is able to encode large asian alphabets. (ASCII is included as a subset.)
72-101-108-108-111-32-67-108-97-115-115-33 Sp ! “ # $ % & ‘ ( ) * + , - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 . / 1 2 3 4 5 6 7 8 9 : ; 46 47 48 49 50 51 52 53 54 55 56 57 58 59 < = > ? @ A B C D E F G H I 60 61 62 63 64 65 66 67 68 69 70 71 72 73 J K L M N O P Q R S T U V W 74 75 76 77 78 79 80 81 82 83 84 85 86 87 X Y Z [ \ ] ^ _ ` a b c d e 88 89 90 91 92 93 94 95 96 97 98 99 100 101 f g h i j k l m n o p q r s 102 103 104 105 106 107 108 109 110 111 112 113 114 115 t u v w x y z { | } ~ 116 117 118 119 120 121 121 123 124 125 126
64 How Computers Work
65 A computer is an electronic machine that takes in data, stores and processes the data, and then produces information. Computers work because they are controlled by instructions stored in memory. They process the data according to these instructions. Computer
66 When people talk about computers, they refer to hardware and software . The parts of the computer you can see and touch are called hardware. The instructions are called computer programs or software. Data is the raw facts in the form of words, sounds, numbers, or pictures. Hardware software data Computer
67 Input is the data you enter into a computer. A computer uses memory and storage to store data. A computer processes data to produce information. Information is data that has been processed so that it is organized, useful, and meaningful. Output is what the computer produces. Output can be words, sounds, numbers, or pictures. Input Memory Information Computer
68 Computers are divided into three general categories: supercomputers, mainframes , and personal computers . Computer
69 Supercomputer are the fastest, most powerful, most expensive, and largest computers. Supercomputers are used by governments, scientists, and businesses, when complicated jobs need to be done. Computer
70 Mainframe computers also are large computers that do large jobs. The amount of data processed and the speed at which the data is processed is not as great as for supercomputers. A hospital might use a mainframe computer to schedule the staff, keep track of the patients, and make sure people get the right medications. Computer
71 Personal computers are computers that people use in their daily lives. Personal computers are smaller and process less data at slower speeds that mainframe computers. Computer
72 The two main types of personal computers are PC compatibles (PC’s) and Macintosh computers (Macs) made by Apple computer company. The two biggest differences between Apple computers and PCs are the operating systems and the basic processor. Computer
73 A notebook computer , also called laptop, is a personal computer that is small enough to fit in a backpack. A handheld computer , also called PDA, is an even smaller personal compute that you can hold in your hand. Computer
74 Understanding Input Devices Each piece of hardware is called a device . Different devices have different jobs. You use an input device to enter data into the computer. The keyboard and the mouse are input devices. The microphone, camera, and scanner also are input devices Input Device
75 You use the keyboard to type characters into the computer. Characters are letters, numbers, and symbols. A typical keyboard has between 101 and 105 keys. The three areas of the keyboard are the standard typing area, numeric keypad, and function keys. Numeric keypad Standard keyboard Function keys Input Device
76 The mouse is a pointing device that is designed to fit in the palm of your hand. You press and release the mouse button to input data. The press and release is called a click. You drag, point, click, and double-click the mouse to give commands to the computer. Input Device
77 A scanner, a digital camera, a touch screen, a digital video camera, a graphic tablet, and a microphone are examples of other input devices. The input device depends on the data you have to enter. Input Device
78 Understanding Output Devices You use an output device to get information out of the computer. A printer prints the information on paper. Speakers or headphones play sound as the output. The monitor, speakers, and printer are the output devices you will use the most. Output Device
79 A monitor shows you information on a screen like a television set. When you turn on a computer, you will see icons, pictures, and words on the screen. The screen you see when you start the computer is called the desktop . Output Device
80 A printer prints the information on paper. Your computer is connected to a printer. You print when you need the output on paper. One printer might be connected through a network to many computers. Computers that are on a network can share one printer. Output Device
81 Printers are categorized in several ways, including the technology they use to print, the number of pages they can print in a minute, and whether they can print using colored inks. Output Device
82 The fastest, but most expensive printers, are called laser printers. Laser printers use a beam of light to transfer toner onto paper to create the images. Toner is a fine powder that works like ink. Printing speeds are measured as ppm , which stands for pages per minute . Laser printers can print at speeds of up to 40 ppm. Output Device
83 Ink-jet printers , although slower than laser printers, print at speeds of one to eight pages per minute. In-jet printers use a special nozzle to spray small drops of colored ink on paper to create the image. Output Device
84 Speakers are an output device for words, music or sounds. Computers have two or more speakers because of the way sound is distributed. A sound card is hardware inside the system unit that processes the sounds. Headphones rest on your head and cover your ears so that only you hear the sounds. Sound Card Output Device
85 Understanding How Data Is Processed and Stored The system unit has hardware inside that processes the data. The system unit is closed to protect the processing hardware . How Data is Processed and Stored
86 If you opened the computer, you would see chips. A chip is a small, electronic device. A chip is manufactured from a silicon wafer, which is cut to a small size and imprinted with circuits and electronic devices. How Data is Processed and Stored
87 The motherboard is the main circuit board in the system unit. It also is called the system board . All the chips and other electronic components of the system unit are connected to the motherboard . How Data is Processed and Stored
88 The Processor is one type of chip. The brains of every computer is the processor. The processor also is called the CPU. CPU stands for Central Processing Unit – it does all the processing. How Data is Processed and Stored
89 Computers also have memory chips . Some memory chips in computer are called RAM. RAM , which stands for random access memory, temporarily stores data and programs while you work on the computer. How Data is Processed and Stored
90 Digital computers use special codes to understand data. Digital uses 0’ s and 1’ s to represent a choice of one of two states – on or off, yes or no, one or zero. How Data is Processed and Stored
91 Each 0 or 1 is called a bit ; these bits are organized into groups of eight, which are called bytes . A byte represents one character. 8 bits equals 1 byte How Data is Processed and Stored
92 Memory is measured in kilobytes or megabytes . Storage, where data and programs are kept after the computer is turned off, is measured in gigabytes . Kilobyte means one thousand bytes 1,000 Megabyte means one million bytes 1,000,000 Gigabyte means one billion bytes 1,000,000,000 How Data is Processed and Stored
93 Input devices are connected to the computer by using cables that plug into ports. A port is what you plug the connector into so data can be transmitted to the computer. Circuit boards that connect to the motherboard have ports that are visible on the back of the system unit. Different types of port connects peripherals. How Data is Processed and Stored
94 A USB port connects devices such as digital cameras. How Data is Processed and Stored
95 A serial port connects devices such as a joystick or modem. How Data is Processed and Stored
96 A parallel port connects printers. How Data is Processed and Stored
97 Computer Software Hardware and Software work together in a computer to process data and create information. You have learned that software, or a program, contains the instructions that tell the computer what to do. The two main types of software are system software and application software. Computer Software
98 System software is the operating system. The operating system runs the computer. It is like the boss of all the software in the computer. Computer Software
99 If you have a PC, you probably have a version of the Windows operating system running your computer. If you have a Mac computer, you have a version of the Mac OS running your computer. Computer Software
100 Application software is a program that does a specific job. You can install different applications depending on the jobs you want the computer to do. Many different types of software are available. Computer Software
101 Storage Devices Computers use files to store data. Files can have instructions, words, pictures, sounds or numbers. Software is stored in files. Each file has a file name that identifies the file. Storage devices read the data from the storage media and write data to the storage media. Storage Devices
102 A floppy disk is removable storage; you can take it with you. Floppy disks are magnetic media, which means they use magnetic technology to create patterns of 0s and 1s to store data. Storage Devices
103 A hard disk is a storage device that is inside the system unit of your computer. The hard disk also uses magnetic technology to record the data. Storage Devices
104 A CD is a compact disc. CDs use optical technology to create the pattern of 0s and 1s to store data. Optical technology is laser, or light, technology. A CD-ROM stores software. It also can store music files and data files. ROM stands for Read Only Memory. Storage Devices
105 A CD-ROM drive is the hardware a computer uses to read data, music and software form a CD. A CD-R can read from a CD and also can write data, music, and software on a CD-R. Storage Devices
106 DVD-ROM (digital video disc-ROM) is another type of optical storage technology. DVDs can store much more data than CDs. DVD-ROMs are used to store large software programs or full-length films. Storage Devices
107 Computer Safety Ethics are rules to help you know whether something is right or wrong. Etiquette is how you behave. Netiquette is etiquette on the Internet. You will learn about rules that you must follow when you are on the Internet. Computer Safety
108 Protecting the Computer Computers are expensive; you must treat a computer as you would any valuable machine. You cannot eat or drink while you work on a computer. Be sure your hands are clean before you type on a keyboard. Hold floppy disk, CD-ROM, and DVD-ROMs properly. If you have a problem with a computer, ask your teacher or the person in charge for help. Do not put heavy objects on the computer. Do not bang or hit the hardware. Computer Safety
109 Sometimes programs contain errors that cause the computer to do things that you do not expect. A crash is when the computer stops working, and you have to restart the computer. These errors or mistakes in programming are called bugs . Computer Safety
110 A computer virus is a program design by a person on purpose to harm other peoples’ computers. A computer virus can cause your computer to crash in such a way that you cannot restart it easily. Computer Safety
111 You can protect your computer from viruses by using antivirus software. You install antivirus software on your computer to detect and remove viruses before they can do harm. Computer Safety
112 Make sure an adult knows when you are working on a computer. If you see something on the screen that scares you or makes you sad, quit the program and then tell your teacher . Computer Safety
113 You always should be considerate of others’ work. You should get permission to use things that are not yours. You never should comply somebody’s work or software without asking for permission. A copyright means the person who created the work also owns the work. Computer Safety
114 Any information about you, your family, and your friends is personal. Do not give out names, addresses, or telephone numbers to anyone unless you have permission from them, a family member, or a teacher. You know which files are yours because you named them. Never open other people’s files unless you get permission. You should never delete any files that you did not create. Computer Safety