1 / 237

ITEC 352 Fall 2018

ITEC 352 Fall 2018. What is a computer?. Church-Turing thesis Turing machines. How many numeric symbols do we use? And why ? 10 of them, these: 0 9 3 1 8 5 4 6 2 7. In base 10 4,561 5 6 1

benderm
Download Presentation

ITEC 352 Fall 2018

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ITEC 352 Fall 2018

  2. What is a computer?

  3. Church-Turing thesis Turing machines

  4. How many numeric symbols do we use? And why? 10 of them, these: 0 9 3 1 8 5 4 6 2 7

  5. In base 10 4,561 5 6 1 ---------------------------------------------------- 1000’s 100’s 10’s 1’s 103 102 101 100

  6. In general , for base B: … b3 b2 b1 b0 The b cubed place the b squared place the b place the 1’s place And while we’re at it: … b3b2 b1 b0 . b-1 b-2 b-3 b-4 …

  7. Bases 32710== 3*100 = 300 2*10 = 20 7*1 = 7 ------ 327 which means 327 in base 10

  8. what is 327 base 10 in base 7? 6457 6*49 = 294 4*7 = 28 5*1 = 5 ------- 32710

  9. Computers use base 2 32710== 1010001112 1*256 = 256 0*128 = 0 1*64 = 64 0*32 = 0 0*16 = 0 0*8 = 0 1*4 = 4 1*2 = 2 1*1 = 1 ------- 327

  10. We care about: base 2 (binary)‏ base 8 (octal)‏ base 16 (hexadecimal or just 'hex')‏ Why octal and hex? What complexity does hex introduce? What do binary, octal, and hex have in common?

  11. Why octal and hex? 1 octal digit = 3 bits 1 hex digit = 4 bits compact, easy conversion to/from binary What complexity does hex introduce? we need more than 10 symbols, 16 in fact What do binary, octal, and hex have in common? powers of 2

  12. Count in powers of 2, from 0 to 1 gig (in base 10)‏ 1 2 4 8 16 32 64 128 256 512 1024 (1 K)‏ 2048 4096 8192 16384 32768 65536 128k 256k 512k 1024k (1 meg)‏

  13. Now do it in base 2 1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000 100000000000 1000000000000 a byte has 2 nibbles: 0000 0001 0000 0010 0000 0100 0000 1000 0001 0000 0010 0000 0100 0000 1000 0000

  14. Now in hex: 1 2 4 8 10 20 40 80 100 200 400 800 1000 2000 4000 8000 10000 20000 40000 We will use a leading “0x” to indicate that the number following is hexadecimal e.g. 0x11 means decimal 17 . .

  15. Know these like you know your times tables Binary Hex Decimal 0000 0x00 0 0001 0x01 1 0010 0x02 2 0011 0x03 3 0100 0x04 4 0101 0x05 5 0110 0x06 6 0111 0x07 7 1000 0x08 8 1001 0x09 9 1010 0x0a 10 1011 0x0b 11 1100 0x0c 12 1101 0x0d 13 1110 0x0e 14 1111 0x0f 15

  16. Why all this is important 0100 0001 == 65 == -v(oltage), +v, -v, -v, -v, -v, -v, +v which may mean: 65 ASCII 'A' the color dark blue a small slice of an audio track a one byte portion of a larger number ... or an infinite number of application defined semantics

  17. Why all this is important Digitization + Boolean Algebra See Claude Shannon

  18. What are the following binary numbers in base 10? 0000 0001 0000 0011 0000 0111 0000 1111 0001 1111 0011 1111 0111 1111 1111 1111 0000 0001 1111 1111 0000 0011 1111 1111 what's the pattern?

  19. What are the following binary numbers in base 10? 1 0000 0001 3 0000 0011 7 0000 0111 15 0000 1111 31 0001 1111 63 0011 1111 127 0111 1111 255 1111 1111 etc. Each is a power of 2 minus 1. When you add one You will go up to the next power of 2.

  20. In base 10: 63 + 1 = 64 In base 2: 0 0 1 1 1 1 1 1 (63) +0 0 0 0 0 0 0 1 (1) --------------------- 0 1 0 0 0 0 0 0 (64, every power of 2 has exactly 1 bit set)

  21. Convert: decimal binary octal hex 7 110 65 12 827 199 100 56 count from 0 to F in binary convert to binary: 0xbed 0xa7 0xf02e 0x31f4 0x76 0xabcdef 0xbadbeef 0xdefaced

  22. Logic Gates: AND given: If Fred is strong and Bob is strong, we will win the football game (“strong” means benches >= 275 pounds)‏ Fred benches 290, Bob benches 310 - Will we win? Fred benches 290, Bob benches 210 – Will we win? Fred benches 135, Bob benches 80 – Will we win? Fred benches 110, Bob benches 300 – Will we win?

  23. AND If Fred is strong and Bob is strong, we will win the football game, otherwise we will lose the football game (“strong” means benches >= 275 pounds)‏ Fred benches 290, Bob benches 310 - Will we win? Fred benches 290, Bob benches 210 – Will we win? Fred benches 190, Bob benches 275 – Will we win? Fred benches 135, Bob benches 80 – Will we win?

  24. AND - ^,juxtaposed Fred Victory Bob F B V 0 0 1 1 0 1 0 1 0 0 0 1 We call this representation a Truth Table

  25. w x y z w x y z (w^x) ^ (y^z)‏ 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 (w ^ x) ^ (y ^ z)‏

  26. w x y z (w ^ x) ^ (y ^ z)‏ w x w^x y z y^z (w^x) ^ (y^z)‏ 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1

  27. OR If Tabitha competes or Katie competes, the world record will be broken Tabitha competes, Katie does not. Will the world record be broken? Katie competes, Tabitha does not. Will the world record be broken? Both Tabitha and Katie compete. Will the world record be broken? Neither Tabitha nor Katie compete. Will the world record be broken?

  28. OR If Tabitha competes or Katie competes, the world record will be broken, otherwise the world record will not be broken. Tabitha competes, Katie does not. Will the world record be broken? Katie competes, Tabitha does not. Will the world record be broken? Both Tabitha and Katie compete. Will the world record be broken? Neither Tabitha nor Katie compete. Will the world record be broken?

  29. OR - ^,+ Tabitha New world record Katie T K WR 0 0 1 1 0 1 0 1 0 1 1 1 OR Truth Table

  30. X Y XY XY+Y Fill out the truth table: X Y XY+Y

  31. NOT - or ' X X'

  32. The basic logic gates, US style

  33. Electronic realization of a nand gate

  34. Truth tables of the basic logic gates nand x y o -------------- 0 0 1 0 1 1 1 0 1 1 1 0 nor x y o --------------- 0 0 1 0 1 0 1 0 0 1 1 0 xor x y o -------------- 0 0 0 0 1 1 1 0 1 1 1 0 not x o -------- 0 1 1 0 xnor x y o -------------- 0 0 1 0 1 0 1 0 0 1 1 1 and x y o -------------- 0 0 0 0 1 0 1 0 0 1 1 1 or x y o -------------- 0 0 0 0 1 1 1 0 1 1 1 1

  35. Boolean functions variables, logic operators, (),= F = xy + y x y F -------------- 0 0 0 0 1 1 1 0 0 1 1 1 or F(x,y)= ∑(1,3)‏

  36. F(x,y,z) = ∑(1,4,5,6,7) x y z F -------------------- 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 draw the logic gates

  37. F = x + y'z now draw the logic gates is that the simplest form? using boolean algebra lets us simplify

  38. Basic relations of Boolean algebra 1. x + 0 = 9. x + y = 2. x^0 = 10. xy = 3. x + 1 = 11. x + (y + z) = 4. x^1 = 12. x(yz) = 5. x + x = 13. x(y + z) = 6. x ^ x = 14. x + yz = 7. x + x' = 15. (x + y)' = 8. x ^ x' = 16. (xy)' = 17.(x')' = 15,16 == DeMorgan's theorems nand,nor

  39. Basic relations of Boolean algebra 1. x + 0 = x 9. x + y = y + x 2. x^0 = 0 10. xy = yx 3. x + 1 = 1 11. x + (y + z) = (x + y) + z 4. x^1 = x 12. x(yz) = (xy)z 5. x + x = x 13. x(y + z) = xy + xz 6. x ^ x = x 14. x + yz = (x + y)(x + z)‏ 7. x + x' = 1 15. (x + y)' = x'y' 8. x ^ x' = 0 16. (xy)' = x' + y' 17.(x')' = x 15,16 == DeMorgan's theorems nand,nor

  40. F = ((ab')' ^ b')' draw the logic gates give the truth table show the function in the sigma notation simplify using the basic relations of boolean algebra

  41. Simplify using the basic relations f = ((ab')' ^ b')' = ab' + b by 16 ab' + b = b + ab' by 9 =(b + a)(b + b') by 14 =(b + a) ^ 1 by 7 = (b + a) by 4 = (a + b) by 9

  42. Combinational Circuits A connected arrangement of logic gates mapping n inputs to m outputs. n inputs == 2n possible binary input combinations each of which yields exactly one set of outputs m outputs => this is a set of m boolean functions, expressed in terms of the n inputs that completely describe the circuit

  43. Binary/hex addition Add these binary numbers: 0 0 1 1 +0 +1 +0 +1 ----- ----- ---- ---- 0111 110111 + 0101 +110001 --------- ------------ 0101 1100 + 1111 1010 ------------------ Add these hex numbers: ba 3c1 +fe + 75f ----- -------

  44. The Half Adder A combinational circuit with two inputs and two outputs the inputs: x,y are the two bits to be added out outputs: s,c are the sum and carry respectively S = x'y + xy' C = xy 1. draw the circuit 2. simplify it and draw it again 3. give the truth table

  45. The Half Adder x C y S x y c s -------------------- 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0

  46. Full Adder Add two binary bits + incoming carry output sum + outgoing carry x S y Z C

  47. Full Adder Truth Table inputs outputs X Y Z S C -------------------------------- 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1

  48. Flip-Flops (i.e memory)‏ also called a latch S Q Q' R Asynchronous – feedback paths -instability operates with both inputs normally at 1 application of a momentary '0' to the S(et) input causes Q to go to 1 and Q' to go to 0 application of a momentary '0' to the R(eset) input causes Q to go to 0 and Q' to go to 1

  49. Clocked RS Flip Flop S Q cp Q' R S R Q(t+1)‏ --------------------------- 0 0 Q(t) no change 0 1 0 clear 1 0 1 SET 1 1 ? don't do it

  50. D Flip Flop Same as RS, but an inverter generates R from S' D Q cp Q' D Q(t+1)‏ --------------------------- 0 0 clear 1 1 set

More Related