Understanding Computer Systems, Logic Gates, and Data Representation

computer systems computer systems n.w
1 / 50
Embed
Share

Explore the fundamentals of computer systems, including layers of computing systems, data representation in binary, ASCII character sets, binary bit addition, logic gates, and their symbols. Learn how bits are used to represent information and the various ways gates and circuits can be represented and analyzed.

  • Computer Systems
  • Logic Gates
  • Data Representation
  • Binary Addition
  • ASCII Characters

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Computer Systems Computer Systems

  2. Layers of a Layers of a Computing Computing System System End-user Application Software System Software Computer Architecture Electronics, Gates and Circuits Data Representation

  3. Data Representation A Bit (Binary digIT) has two possible values 0 and 1 Used to represent one of two discrete states. 0 (OFF) or 1 (ON) 0 (False) or 1 (True) Two bits can represent four different things. Three bits can represent eight different things. How many things can n bits represent? Bits are used to represent numbers, text characters, images, sound, etc. 3

  4. ASCII Character Set

  5. ASCII Character Set

  6. Binary (bit) Addition Binary (bit) Addition Only four possible combinations of input: Truth Table Logic Gates (Circuit) Boolean Expressions ??? = ?. ? + ?.? ????? = ?.?

  7. Logic Gates Bits can be used to represent electrical signals: 0 (0V) or 1 (5V) A gate is a device that performs a logical operation on electrical signals These logical operations were defined by the mathematician George Boole (1815-64) The most common logic (Boolean) operations are: NOT AND OR XOR NAND NOR

  8. Logic Gates Symbols Each gate has its own logic symbol which allows circuits to be represented by a logic diagram AND NAND OR NOR NOT Exclusive OR (XOR) Logic gates have one or more inputs and a single output

  9. Logic Gates The behaviour of gates (and circuits) are commonly represented in any of the following ways: Boolean Expressions Uses Boolean algebra, a mathematical notation for expressing two- valued logic Logic Diagrams A graphical representation of a circuit; each gate has its own symbol Truth Tables A table showing all possible input values and the associated output values

  10. The AND The AND operation operation In order for the output to be 1 both inputs must be 1

  11. The OR The OR operation operation In order for the output to be 1 either input must be 1.

  12. The The NOT operation NOT operation Inverts a single input. Also called an inverter.

  13. NAND NAND A NAND B = NOT (A AND B) NOR NOR A NOR B = NOT (A OR B)

  14. The The XOR (eXclusive OR) operation XOR (eXclusive OR) operation In order for the output to be 1 either (but not both) inputs must be 1. (A AND NOT B) OR (NOT A AND B) = A XOR B

  15. Boolean Algebra Boolean Algebra Boolean Constants:these are 0 (false) and 1 (true) Boolean Variables:variables that can only take the vales 0 or 1 Boolean Functions: such as NOT, AND and OR (in that order) Boolean Theorems: a set of identities and laws

  16. Complete the truth table for a Boolean expression Complete the truth table for a Boolean expression A + ?

  17. Complete the truth table for a Boolean expression Complete the truth table for a Boolean expression ?.?

  18. Using Using truth tables to verify identities truth tables to verify identities Let s say we wanted to investigate whether the identity holds Is NOT A AND NOT B = NOT (A AND B) ?

  19. Using Using truth tables to verify identities truth tables to verify identities Investigate whether the identity holds A + A.B = ?

  20. Using Using truth tables to verify identities truth tables to verify identities Distribution : A. B + C = A.B + A.C

  21. Using Using truth tables to verify identities truth tables to verify identities Distribution : A + B.C = A + B . A + C

  22. Using Using truth tables to verify truth tables to verify identities identities - - exercise exercise De Morgan's laws are used to simplify Boolean equations so that you can build equations only involving one sort of gate. Verify De Morgan's laws using truth tables ? + ? = ?.? ?. ? = ? + ?

  23. Using Using truth tables to verify truth tables to verify identities identities - - SOLUTIONS SOLUTIONS ?.? = ? + ? ? + ? = ?. ?

  24. Create a Boolean Expression from a logic diagram Create a Boolean Expression from a logic diagram Work progressively from the inputs to the output adding logic expressions to the output of each gate in turn A. B + C B + C

  25. Create a Boolean Expression from a logic diagram Create a Boolean Expression from a logic diagram Work progressively from the inputs to the output adding logic expressions to the output of each gate in turn A.B A.B + B.C A.C

  26. Create a Boolean Expression from a logic diagram Create a Boolean Expression from a logic diagram

  27. Connect Logic Gates (to create circuits) Connect Logic Gates (to create circuits) Logic gates may be combined by using the output of one gate as the input to another.

  28. Connect Logic Gates (to create circuits) Connect Logic Gates (to create circuits) Circuits in which the output is determined solely by the current inputs are termed combinational logic circuits. A AND NOT B OR NOT A AND B = A XOR B

  29. Half Half- -adder adder An adder is a digital circuit that performs addition of numbers. A half adder adds two binary digits and produces two outputs the sum and the carry A SUM Half Adder B CARRY

  30. Half Half- -adder adder Only four possible combinations of input: ??? = ?. ? + ?.? ????? = ?.?

  31. Half Half- -adder adder ??? = ?. ? + ?.? B A ?. ? ? SUM ?. ?.? ????? = ?.? A CARRY B

  32. Half Half- -adder adder A B SUM CARRY

  33. Half Half- -adder (refined) adder (refined) The circuit for SUM can be simplified as follows: ??? = ?. ? + ?.? = ? ? (i.e. A XOR B) The half-adder can now be realised with fewer gates as shown A SUM B CARRY

  34. Full Full- -adder adder A full adder adds the carry in bit to two binary digits and produces two outputs the sum and carry out. A SUM Full Adder B Carry In CARRY (out)

  35. Full Full- -adder adder A full adder adds the carry in bit to two binary digits and produces two outputs the sum and carry out ??? = ?. ?.? + ?.?. ? + ?. ?. ? + ?.?.? ????? = ?.?.? + ?. ?.? + ?.?. ? + ?.?.?

  36. Full Full- -adder adder (circuit for SUM) (circuit for SUM) ??? = ?. ?.? + ?.?. ? + ?. ?. ? + ?.?.? ??? = ? ( ?.? + ?. ? + ?( ?. ? + ?.? ?. ? + ?.? = ? ? Taking, ?.? + ?. ? = ? ? ? = ? ? ?.? + ?. ? ??? = A ??? = ? ? B ??? = ? ? ? SUM C

  37. Full Full- -adder adder (circuit for (circuit for CARRY) CARRY) ????? = ?.?.? + ?. ?.? + ?.?. ? + ?.?.? ????? = ?( ?.? + ?. ? + ?.?(? + ? ????? = ?(? ? + ?.? A B C CARRY

  38. Full Full- -adder adder ??? = ? ? ? ????? = ?.(? ? + ?.? A A XOR B B C SUM A XOR B XOR C C AND (A XOR B) CARRY C AND (A XOR B) OR (A AND B) A AND B

  39. Computer Architecture Computer Architecture

  40. The stored program concept Early computers (e.g. ENIAC) were fixed-program machines. Programs were wired into the machines. (Data and programs were treated separately.) In 1945 John von Neumann and Alan Turing independently proposed what has become known as the stored program computer. A computer architecture that allows programs and data to reside together in memory. The contents of memory is interpreted as an instruction when the next instruction pointer references it and as data when an instruction references it. Stored programs are not part of physical machine. Program instructions are directly accessible by the processor. Instructions are fetched and executed one at a time.

  41. Von Neumann Architecture Central Processing Unit (CPU) Output Devices Control Unit (CU) Input Devices Arithmetic Logic Unit (ALU) 2.11 describe the different components within a computer and the function of those components Primary Memory Secondary Storage Devices The components are connected to one another by a collection of wires called a bus

  42. Von Neumann Architecture There are four major components in a computer connected together by buses: 1. Primary Memory: The temporary store for instructions and data. 2. Central Processing Unit (CPU): Controls the operation of the computer. The Control Unit (responsible for the fetch-execute cycle) The Arithmetic Logic Unit (ALU) (carries out arithmetic and logical operations) 3. Input/Output (I/O) Units: Handle communication with the outside world. 4. Secondary Storage Units: Long term storage of data. Data is moved from secondary storage to primary memory for CPU execution. 44

  43. Memory Memory is a collection of cells, each with a unique physical address A cell is the smallest addressable unit of memory Addresses are of fixed size the address length Cells are of fixed size the word length (word size) Random Access Memory (RAM) A cell with a low address is just as accessible as one with a high address. Contents are volatile. Read Only Memory (ROM) Non-volatile memory used to store firmware (specialised programs used to carry out specific tasks typically when a computer is switched on.)

  44. The von Neumann Architecture of a Computer Central Processing Unit (CPU) Arithmetic Logic Unit (ALU) Control Unit (CU) IR PC ACC1 ACC3 ACC2 Output Devices Input Devices MAR MDR Input Output Controller Input Output Controller System Buses Primary Memory PC: Program Counter IR: Instruction Register MAR: Memory Address Register MDR: Memory Data Register ACC: Accumulator Secondary Storage Devices

  45. Registers Storage locations internal to the CPU Used as a scratchpad by the CPU to store data, addresses or instructions as it executes each program instruction Data can be moved into and out of registers faster than from memory dedicated pathways Made from the fastest memory technology. Therefore, Expensive Relatively few (typically several dozen) Each register is wired for a specific purpose. Two broad types general purpose and special purpose

  46. Special Purpose Registers Program Counter Register (PC) Contains the address of the next instruction to be execute Also called instruction pointer (IP) Current Instruction Register (IR) Holds the instruction that is being executed Memory Address Register (MAR) Holds the address of the next piece of data or instruction to be used Memory Data Register (MDR) Holds the data to be stored in memory / loaded from memory Accumulator Used by the ALU to perform arithmetic and logic operations

  47. The Fetch-Execute Cycle At the start of the fetch-execute cycle the Program Counter contains the address of the next instruction to be executed. Central Processing Unit (CPU) Arithmetic Logic Unit (ALU) Control Unit (CU) PC IR Step 1. Fetch. The contents of the address in the PC are loaded from memory to the Instruction Register (IR) (via the MAR and MDR) Decode Execute ACC Step 2. Decode The control unit determines the type of instruction to be carried out and sets the control signals accordingly. MAR MDR Step 3. Execute The operation is carried out by the CU or the ALU (depending on the instruction load and store operations are carried out by the CU while arithmetic and logical operations are carried out in the ALU). Fetch (Store) Primary Memory (RAM) Step 4. Store The result of the operation is written to registers or RAM. https://www.youtube.com/watch?v=jFDMZpkUWCw https://www.youtube.com/watch?v=04UGopESS6A

  48. Basic Electronics Basic Electronics

  49. Basic Electronics Voltage Current Resistors Capacitors Transistors Integrated Circuits Students learn about: CPU: ALU, Registers, Program counter, Memory / Basic electronics: voltage, current, resistors, capacitors, transistors

  50. Recommended Viewing https://www.youtube.com/results?search_query=crash+course+computer+science

Related


More Related Content