{"id":21,"date":"2018-07-26T08:26:27","date_gmt":"2018-07-26T08:26:27","guid":{"rendered":"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=21"},"modified":"2018-08-10T09:57:01","modified_gmt":"2018-08-10T09:57:01","slug":"introduction-to-computing","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/chapter\/introduction-to-computing\/","title":{"rendered":"Introduction to Computing"},"content":{"raw":"<div>\r\n\r\n&nbsp;\r\n\r\n<strong>About the course :<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In this digital world, embedded systems are more important in day to day life. Embedded processors are even more important as key components of embedded products ranging from toys to aeroplane. Cell phone is the most important embedded device ruling our lives. So It is necessary to understand the basics behind the embedded systems. In this course basics about micro controllers, how to program them and how to make embedded products will be discussed.<\/p>\r\n&nbsp;\r\n\r\n<strong>Learning Outcomes :<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u25cf To understand the hardware and software of embedded systems one must know basic concepts of digital computer design.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u25cf In this lecture fundamentals of numbering system, logic gates, digital circuits, basic system architecture\u00a0 and working of computer\u00a0 will be discussed.<\/p>\r\n&nbsp;\r\n\r\nYou will mostly be familiar with all this - this is just a quick recap !\r\n\r\n&nbsp;\r\n\r\n<strong>1.1 System<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A system is defined as \u201ca way of working, organizing or performing one or many tasks according to a fixed set of rules programs or plans\u201d (or) as \u201can arrangement in which all units assemble and work together according to a program or plan\u201d. On the other hand, an embedded system is a system that has software embedded into computer hardware, which makes a system dedicated for an application or specific part of an application or a product, or part of a larger system.<\/p>\r\n&nbsp;\r\n\r\n<strong>1.2 Digital fundamentals<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">All digital computing systems work with binary values (bits). Generation of binary values and working with bits are important in computing systems. The common number system we use is the \u201cDecimal\u201d number system(base 10 system). There are 10 distinct symbols, 0, 1, 2, \u2026,9 whereas computers use binary numbers (base 2 system).There are only two symbols 0 and 1. These two binary digits are commonly referred to as bits. Each decimal number has to be converted into binary for processing. The following are the steps to convert from decimal to binary number system, and vice-versa.<\/p>\r\n&nbsp;\r\n\r\n<strong><em>1.2.1 Steps for Decimal to Binary conversion<\/em><\/strong>\r\n\r\n&nbsp;\r\n\r\n\u2022 Divide the decimal number by 2 repeatedly\r\n\r\n<\/div>\r\n<div>\r\n\r\n\u00a0 \u00a0 \u2022 Keep track of the remainders\r\n\r\n&nbsp;\r\n\r\n\u2022 Continue this process until the quotient becomes zero\r\n\r\n&nbsp;\r\n\r\n\u2022 Write the remainders in reverse order to obtain the binary number Example 2510 = 110012\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-24 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2.png\" alt=\"\" width=\"291\" height=\"123\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong><em>1.2.2 Steps for Binary to Decimal conversion<\/em><\/strong>\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0 Know the weight of each bit in a binary number according to its position\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0 Multiply each bit by its weight\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0 Add them together to get the decimal equivalent\r\n\r\n&nbsp;\r\n\r\nExample\u00a0\u00a0\u00a0\u00a0\u00a0 110012 = 1*20 + 0*21 + 0*22 + 1*23 + 1*24 =\u00a0\u00a0\u00a0\u00a0\u00a0 2510\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Another number system generally used for compact representation is the <strong>Hexadecimal<\/strong> <strong>System <\/strong>( base 16 system) (Fig 1.1). It is used as a convenient representation of binary numbers.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-25 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1.png\" alt=\"\" width=\"391\" height=\"305\" \/>\r\n\r\n<strong><em>1.2.3 Steps for Binary to Hexadecimal Conversion<\/em><\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u25cf In the binary number system, group the binary digits, 4 bits at a time, starting from the right side (least significant bit)<\/p>\r\n\r\n<\/div>\r\n<div>\r\n<p style=\"text-align: justify\">\u00a0\u25cf Replace each 4-bit binary number with its hex equivalent (Fig 1.2).<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-26 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2.png\" alt=\"\" width=\"537\" height=\"124\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong><em>1.2.4 Logic gates<\/em><\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">To process these binary values logic gates - AND, OR, NOT, XOR, NAND and NOR are widely used (Fig 1.3-1.5).<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-27 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3.png\" alt=\"\" width=\"530\" height=\"317\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In an AND gate, the output variable is true (1) only when both the input variables A and B are true(1). It acts like a multiplier. In an OR gate, the output variable is true(1) when any one of the input variables is true(1). It acts like an adder.<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-28 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4.png\" alt=\"\" width=\"584\" height=\"353\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In an inverter (NOT gate), the output variable is true(1) when the input variable is false(0), and the output is false(0) when the input variable is true(1). It inverts the logic sense of the binary variable. It is used in subtraction operation. In an XOR gate, the output is true(1) when any one of the inputs is true(1). It is used for comparison (Fig 1.4).<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-30 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6.png\" alt=\"\" width=\"547\" height=\"326\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">NAND and NOR gates (Fig 1.5) are the compliment of the AND and OR gates respectively. NAND and NOR gates are universal gates because using these gates we can generate any logic function. So these gates are used extensively.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em;text-align: initial\">Using the above set of gates any kind of digital operations can be done with digital circuits. The following is the example for adding two bits which is the half adder circuit using an XOR and an AND gate(Fig 1.6).<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-31 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-7.png\" alt=\"\" width=\"261\" height=\"221\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022 Flip-flops are frequently used to store data. There are many types of flip-flops - D, RS, JK etc. A clocked D flip-flop is shown in Fig 1.7.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-32 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-8.png\" alt=\"\" width=\"344\" height=\"382\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>2. Computer Hardware<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A computer hardware is made with these kind of digital circuits (Fig 2.1). A computer system has a CPU (Central Processing Unit) which executes instructions stored in memory, I\/O (Input\/output) devices which provide a means of communicating with CPU and Memory to store data and programs. There are different kinds of memory. They are:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em;text-align: initial\">RAM (Random Access Memory) \u2013 It is a temporary storage of programs when the computer is running. The data is lost when the computer is off.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">ROM (Read Only Memory) \u2013 It contains programs and information essential for the operation of the computer. This information cannot be changed by use, and is not lost when power is off. It is called as nonvolatile memory.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-33 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9.png\" alt=\"\" width=\"546\" height=\"272\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The internal working can be broken down into three parts namely CPU, memory and I\/O devices. The function of the CPU is to execute instructions stored in memory. The function of I\/O devices such as keyboard and video monitor is to provide a means of communicating with the CPU. The CPU is connected to memory and I\/O through strips of wires called a bus. It carries information from place to place.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Based on the usage\/purpose of communication, these are named as Address bus\/Data bus\/Control bus. Address bus will communicate the address for memory locations. It is unidirectional and is used to identify the devices and memory connected to CPU - the more address lines available, the larger the number of devices that can be addressed. It determines the number of locations with which it can communicate. The number of locations is always equal to 2x where x is the number of address lines, regardless of the size of the data bus. For example, a CPU with 16 address lines can provide a total of 65,536 or 64k bytes of addressable memory.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The grouping of data lines is called data bus. It is bidirectional, since the CPU must use it either to receive or to send data. The size of data bus in CPUs normally varies between 8 and 64. Early computers such as Apple 2 use an 8 bit data bus while super-computers such as Cray use a 64 bit bus. Control bus will send control signals.<\/p>\r\n&nbsp;\r\n\r\n<strong>2.1 Inside CPUs<\/strong>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-34 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10.png\" alt=\"\" width=\"450\" height=\"333\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A program stored in memory provides instruction to the CPU to perform an action (Fig 2.2). The action can simply be adding data such as payroll data, or controlling a machine as a robot. It is the function of CPU to fetch these instruction from memory and execute them. To perform the actions of fetch and execute, all CPUs are equipped with resources as explained below.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">1. The CPU uses registers to store the information temporarily. The information could be two values to be processed or the address of the value needed to be fetched from memory. Depending on the CPU, registers can be 8-bits, 32-bits or even 64-bits wide. The more and bigger the registers, the better the CPU. The disadvantage of bigger registers is that it will increase the cost of that CPU.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">2. The CPU has ALU (Arithmetic\/Logic Unit). The ALU is used for performing arithmetic functions such as addition, subtraction, multiplication, division and logic functions such as AND, OR and NOT.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">3. Every CPU has a Program Counter. The function of the Program Counter(PC) is to point to the address of the next instruction that is to be executed. As each instruction is executed, the program counter is incremented to the address of the next instruction that is to be executed.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">4. The function of the instruction decoder is to interpret the instructions fetched into the CPU. The complexity of the instruction decoder depends on the type and number of instructions supported. A CPU requires more hardware (transistors in design) for understanding a large number of instructions. Hence, there is a trend towards keeping the number of instructions limited (Reduced Instruction Set Computers - RISC).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the example shown in Fig. 2.2, the CPU has registers called A, B, C and D. It has an 8-bit data bus and a 16 bit address bus. Hence the CPU can access memory from address 0000 to FFFFH. Thus, the hardware architecture gives complete inner details of the system. This hardware(system) is used for processing data in association with the software.<\/p>\r\n&nbsp;\r\n\r\n<strong>3. Summary<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">In this module, different definitions of system and embedded system have been outlined. Fundamentals of computing, digital processing and different number systems are discussed. Logic circuits for digital design is also discussed. An introduction to System architecture has been given.<\/span><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n<strong>Supporting books<\/strong>\r\n<ul>\r\n \t<li><em>The 8051 Microcontroller and Embedded Systems Using Assembly and C<\/em><em>Second Edition Muhammad Ali Mazidi, Janice Gillispie Mazidi,Rolin D. McKinlay<\/em><\/li>\r\n \t<li><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/www.google.co.in\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;cad=rja&amp;uact=8&amp;ved=0CCIQFjAB&amp;url=http%3A%2F%2Fwww.slideshare.net%2Fnakulrtm%2Fdigital-design-5th-edition-by-m-morris-mano-and-michael-ciletti-37723248&amp;ei=K9XJVJnwJc7d8AXroYGYDQ&amp;usg=AFQjCNEZQoga82AEfiZb7nGClTReKBGZXw&amp;sig2=1BuwQ0xAqhrf7L0ItLfLjA\"><em>Digital design, 5th edition by M. Morris Mano and Michael<\/em><\/a><\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Web Links<\/strong>\r\n<ul>\r\n \t<li>http:\/\/en.wikipedia.org\/wiki\/Embedded_system<\/li>\r\n \t<li><em style=\"text-align: initial;font-size: 1em\">http:\/\/en.wikibooks.org\/wiki\/Embedded_Systems\/Embedded_Systems_Introduction<\/em><\/li>\r\n<\/ul>","rendered":"<div>\n<p>&nbsp;<\/p>\n<p><strong>About the course :<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In this digital world, embedded systems are more important in day to day life. Embedded processors are even more important as key components of embedded products ranging from toys to aeroplane. Cell phone is the most important embedded device ruling our lives. So It is necessary to understand the basics behind the embedded systems. In this course basics about micro controllers, how to program them and how to make embedded products will be discussed.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Learning Outcomes :<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u25cf To understand the hardware and software of embedded systems one must know basic concepts of digital computer design.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u25cf In this lecture fundamentals of numbering system, logic gates, digital circuits, basic system architecture\u00a0 and working of computer\u00a0 will be discussed.<\/p>\n<p>&nbsp;<\/p>\n<p>You will mostly be familiar with all this &#8211; this is just a quick recap !<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1.1 System<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A system is defined as \u201ca way of working, organizing or performing one or many tasks according to a fixed set of rules programs or plans\u201d (or) as \u201can arrangement in which all units assemble and work together according to a program or plan\u201d. On the other hand, an embedded system is a system that has software embedded into computer hardware, which makes a system dedicated for an application or specific part of an application or a product, or part of a larger system.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1.2 Digital fundamentals<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">All digital computing systems work with binary values (bits). Generation of binary values and working with bits are important in computing systems. The common number system we use is the \u201cDecimal\u201d number system(base 10 system). There are 10 distinct symbols, 0, 1, 2, \u2026,9 whereas computers use binary numbers (base 2 system).There are only two symbols 0 and 1. These two binary digits are commonly referred to as bits. Each decimal number has to be converted into binary for processing. The following are the steps to convert from decimal to binary number system, and vice-versa.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><em>1.2.1 Steps for Decimal to Binary conversion<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 Divide the decimal number by 2 repeatedly<\/p>\n<\/div>\n<div>\n<p>\u00a0 \u00a0 \u2022 Keep track of the remainders<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 Continue this process until the quotient becomes zero<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 Write the remainders in reverse order to obtain the binary number Example 2510 = 110012<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2.png\" alt=\"\" width=\"291\" height=\"123\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2.png 291w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-65x27.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-225x95.png 225w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><em>1.2.2 Steps for Binary to Decimal conversion<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0 Know the weight of each bit in a binary number according to its position<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0 Multiply each bit by its weight<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0 Add them together to get the decimal equivalent<\/p>\n<p>&nbsp;<\/p>\n<p>Example\u00a0\u00a0\u00a0\u00a0\u00a0 110012 = 1*20 + 0*21 + 0*22 + 1*23 + 1*24 =\u00a0\u00a0\u00a0\u00a0\u00a0 2510<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Another number system generally used for compact representation is the <strong>Hexadecimal<\/strong> <strong>System <\/strong>( base 16 system) (Fig 1.1). It is used as a convenient representation of binary numbers.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1.png\" alt=\"\" width=\"391\" height=\"305\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1.png 391w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1-300x234.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1-65x51.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1-225x176.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-1-350x273.png 350w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/p>\n<p><strong><em>1.2.3 Steps for Binary to Hexadecimal Conversion<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u25cf In the binary number system, group the binary digits, 4 bits at a time, starting from the right side (least significant bit)<\/p>\n<\/div>\n<div>\n<p style=\"text-align: justify\">\u00a0\u25cf Replace each 4-bit binary number with its hex equivalent (Fig 1.2).<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-26 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2.png\" alt=\"\" width=\"537\" height=\"124\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2.png 537w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2-300x69.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2-65x15.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2-225x52.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-2-350x81.png 350w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><em>1.2.4 Logic gates<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To process these binary values logic gates &#8211; AND, OR, NOT, XOR, NAND and NOR are widely used (Fig 1.3-1.5).<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3.png\" alt=\"\" width=\"530\" height=\"317\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3.png 530w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3-300x179.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3-225x135.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-3-350x209.png 350w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In an AND gate, the output variable is true (1) only when both the input variables A and B are true(1). It acts like a multiplier. In an OR gate, the output variable is true(1) when any one of the input variables is true(1). It acts like an adder.<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-28 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4.png\" alt=\"\" width=\"584\" height=\"353\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4.png 584w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4-300x181.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4-225x136.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-4-350x212.png 350w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In an inverter (NOT gate), the output variable is true(1) when the input variable is false(0), and the output is false(0) when the input variable is true(1). It inverts the logic sense of the binary variable. It is used in subtraction operation. In an XOR gate, the output is true(1) when any one of the inputs is true(1). It is used for comparison (Fig 1.4).<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-30 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6.png\" alt=\"\" width=\"547\" height=\"326\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6.png 547w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6-300x179.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6-225x134.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-6-350x209.png 350w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">NAND and NOR gates (Fig 1.5) are the compliment of the AND and OR gates respectively. NAND and NOR gates are universal gates because using these gates we can generate any logic function. So these gates are used extensively.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em;text-align: initial\">Using the above set of gates any kind of digital operations can be done with digital circuits. The following is the example for adding two bits which is the half adder circuit using an XOR and an AND gate(Fig 1.6).<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-7.png\" alt=\"\" width=\"261\" height=\"221\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-7.png 261w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-7-65x55.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-7-225x191.png 225w\" sizes=\"auto, (max-width: 261px) 100vw, 261px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022 Flip-flops are frequently used to store data. There are many types of flip-flops &#8211; D, RS, JK etc. A clocked D flip-flop is shown in Fig 1.7.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-32 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-8.png\" alt=\"\" width=\"344\" height=\"382\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-8.png 344w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-8-270x300.png 270w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-8-65x72.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-8-225x250.png 225w\" sizes=\"auto, (max-width: 344px) 100vw, 344px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>2. Computer Hardware<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A computer hardware is made with these kind of digital circuits (Fig 2.1). A computer system has a CPU (Central Processing Unit) which executes instructions stored in memory, I\/O (Input\/output) devices which provide a means of communicating with CPU and Memory to store data and programs. There are different kinds of memory. They are:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em;text-align: initial\">RAM (Random Access Memory) \u2013 It is a temporary storage of programs when the computer is running. The data is lost when the computer is off.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">ROM (Read Only Memory) \u2013 It contains programs and information essential for the operation of the computer. This information cannot be changed by use, and is not lost when power is off. It is called as nonvolatile memory.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-33 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9.png\" alt=\"\" width=\"546\" height=\"272\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9.png 546w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9-300x149.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9-225x112.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-9-350x174.png 350w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The internal working can be broken down into three parts namely CPU, memory and I\/O devices. The function of the CPU is to execute instructions stored in memory. The function of I\/O devices such as keyboard and video monitor is to provide a means of communicating with the CPU. The CPU is connected to memory and I\/O through strips of wires called a bus. It carries information from place to place.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Based on the usage\/purpose of communication, these are named as Address bus\/Data bus\/Control bus. Address bus will communicate the address for memory locations. It is unidirectional and is used to identify the devices and memory connected to CPU &#8211; the more address lines available, the larger the number of devices that can be addressed. It determines the number of locations with which it can communicate. The number of locations is always equal to 2x where x is the number of address lines, regardless of the size of the data bus. For example, a CPU with 16 address lines can provide a total of 65,536 or 64k bytes of addressable memory.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The grouping of data lines is called data bus. It is bidirectional, since the CPU must use it either to receive or to send data. The size of data bus in CPUs normally varies between 8 and 64. Early computers such as Apple 2 use an 8 bit data bus while super-computers such as Cray use a 64 bit bus. Control bus will send control signals.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>2.1 Inside CPUs<\/strong><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-34 aligncenter\" src=\"http:\/\/csp13.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10.png\" alt=\"\" width=\"450\" height=\"333\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10.png 450w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10-300x222.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10-65x48.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10-225x167.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-content\/uploads\/sites\/62\/2018\/07\/2-10-350x259.png 350w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A program stored in memory provides instruction to the CPU to perform an action (Fig 2.2). The action can simply be adding data such as payroll data, or controlling a machine as a robot. It is the function of CPU to fetch these instruction from memory and execute them. To perform the actions of fetch and execute, all CPUs are equipped with resources as explained below.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1. The CPU uses registers to store the information temporarily. The information could be two values to be processed or the address of the value needed to be fetched from memory. Depending on the CPU, registers can be 8-bits, 32-bits or even 64-bits wide. The more and bigger the registers, the better the CPU. The disadvantage of bigger registers is that it will increase the cost of that CPU.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">2. The CPU has ALU (Arithmetic\/Logic Unit). The ALU is used for performing arithmetic functions such as addition, subtraction, multiplication, division and logic functions such as AND, OR and NOT.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">3. Every CPU has a Program Counter. The function of the Program Counter(PC) is to point to the address of the next instruction that is to be executed. As each instruction is executed, the program counter is incremented to the address of the next instruction that is to be executed.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">4. The function of the instruction decoder is to interpret the instructions fetched into the CPU. The complexity of the instruction decoder depends on the type and number of instructions supported. A CPU requires more hardware (transistors in design) for understanding a large number of instructions. Hence, there is a trend towards keeping the number of instructions limited (Reduced Instruction Set Computers &#8211; RISC).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the example shown in Fig. 2.2, the CPU has registers called A, B, C and D. It has an 8-bit data bus and a 16 bit address bus. Hence the CPU can access memory from address 0000 to FFFFH. Thus, the hardware architecture gives complete inner details of the system. This hardware(system) is used for processing data in association with the software.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>3. Summary<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">In this module, different definitions of system and embedded system have been outlined. Fundamentals of computing, digital processing and different number systems are discussed. Logic circuits for digital design is also discussed. An introduction to System architecture has been given.<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Supporting books<\/strong><\/p>\n<ul>\n<li><em>The 8051 Microcontroller and Embedded Systems Using Assembly and C<\/em><em>Second Edition Muhammad Ali Mazidi, Janice Gillispie Mazidi,Rolin D. McKinlay<\/em><\/li>\n<li><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/www.google.co.in\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;cad=rja&amp;uact=8&amp;ved=0CCIQFjAB&amp;url=http%3A%2F%2Fwww.slideshare.net%2Fnakulrtm%2Fdigital-design-5th-edition-by-m-morris-mano-and-michael-ciletti-37723248&amp;ei=K9XJVJnwJc7d8AXroYGYDQ&amp;usg=AFQjCNEZQoga82AEfiZb7nGClTReKBGZXw&amp;sig2=1BuwQ0xAqhrf7L0ItLfLjA\"><em>Digital design, 5th edition by M. Morris Mano and Michael<\/em><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Web Links<\/strong><\/p>\n<ul>\n<li>http:\/\/en.wikipedia.org\/wiki\/Embedded_system<\/li>\n<li><em style=\"text-align: initial;font-size: 1em\">http:\/\/en.wikibooks.org\/wiki\/Embedded_Systems\/Embedded_Systems_Introduction<\/em><\/li>\n<\/ul>\n","protected":false},"author":2,"menu_order":2,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-k-vani"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-21","chapter","type-chapter","status-publish","hentry","contributor-dr-k-vani"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/chapters\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":5,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/chapters\/21\/revisions"}],"predecessor-version":[{"id":434,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/chapters\/21\/revisions\/434"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/chapters\/21\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/pressbooks\/v2\/chapter-type?post=21"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/wp\/v2\/contributor?post=21"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp13\/wp-json\/wp\/v2\/license?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}