04-612-307...
TRANSCRIPT
![Page 1: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/1.jpg)
04-612-307 ระบบคอมพวิเตอร์และการเช่ือมโยง Computer Systems and Interfacing
บทที ่1 พืน้ฐานดจิติอล
สาขาวชิาวศิวกรรมคอมพวิเตอร์คณะวศิวกรรมศาสตร์ มหาวิทยาลยัเทคโนโลยรีาชมงคลพระนคร
![Page 2: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/2.jpg)
Digital and Analog Quantities
![Page 3: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/3.jpg)
Digital and Analog Quantities
Analog quantities have continuous valuesDigital quantities have discrete sets of values
![Page 4: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/4.jpg)
Digital and Analog Quantities
Analog quantities have
continuous valuesDigital quantities have
discrete sets of values
![Page 5: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/5.jpg)
Digital and Analog Quantities
Types of electronic devices or instruments:AnalogDigitalCombination analog and digital
![Page 6: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/6.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
![Page 7: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/7.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
The conventional numbering system uses ten digits: 0,1,2,3,4,5,6,7,8, and 9.
The binary numbering system uses just two digits: 0 and 1.
![Page 8: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/8.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
The two binary digits are designated 0 and 1
They can also be called LOW and HIGH, where LOW = 0 and HIGH = 1
![Page 9: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/9.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
Binary values are also
represented by voltage levels
![Page 10: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/10.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
Major parts of a digital pulseBase lineAmplitudeRise time (tr)Pulse width (tw)Fall time (tf)
![Page 11: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/11.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
T
1f
tw = pulse widthT = period of the waveform f = frequency of the waveform
![Page 12: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/12.jpg)
Binary Digits, Logic Levels, and Digital Waveforms
%100T
tcycle Duty w
The duty cycle of a binary waveform is
defined as:
![Page 13: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/13.jpg)
Basic Logic Operations
![Page 14: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/14.jpg)
Basic Logic Operations
There are only three basic logic operations:
![Page 15: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/15.jpg)
Basic Logic Operations
When the input is LOW, the output is HIGHWhen the input is HIGH, the output is LOW
The NOT operation
The output logic level is
always opposite the input
logic level.
![Page 16: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/16.jpg)
Basic Logic Operations
The AND operation When any input is LOW, the output is LOW When both inputs are HIGH, the output is HIGH
Switch S1 AND Switch S2 must be
closed to light the lamp
![Page 17: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/17.jpg)
Basic Logic Operations
The OR operation
When any input is HIGH, the output is HIGH When both inputs are LOW, the output is
LOW
Switch S1 OR Switch S2 (or both of
them) must be closed to light the
lamp
![Page 18: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/18.jpg)
Introduction
Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR.
Switch S1 OR Switch S2 (or both of
them) must be closed to light the
lamp
Switch S1 AND Switch S2 must be
closed to light the lamp
![Page 19: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/19.jpg)
Three basic logic gates
![Page 20: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/20.jpg)
Common logic gates
NAND and NOR gates are logically equivalent to AND and OR gates followed by inverters. Since NAND is actually easier to build, ANDs are often constructed as inverted NAND gates.
![Page 21: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/21.jpg)
Example: logic diagram for a + b’c
![Page 22: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/22.jpg)
More complicated expression
The logic diagram above depicts ((ab + bc’)a)’For a parenthesized expression, construct parenthesized portion first
Note the connectors () used to indicate a continuation of the same input (for a and b)
![Page 23: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/23.jpg)
Same expression, abbreviated
Two inverters eliminated: first by including c’ as an input (instead of c) and second by making the third AND gate a NAND gate
In this version, inputs a and b are shown multiple times – use same symbols, so we know they’re the same inputs
![Page 24: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/24.jpg)
One more example
To translate logic diagram to Boolean expression: label output of each gate (starting from left) with appropriate sub-
expression output of last gate is full expression
![Page 25: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/25.jpg)
Fixed-Function Integrated Circuits
![Page 26: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/26.jpg)
Fixed-Function Integrated Circuits
IC package stylesDual in-line package (DIP)Small-outline IC (SOIC)Flat pack (FP)Plastic-leaded chip carrier (PLCC)Leadless-ceramic chip carrier (LCCC)
![Page 27: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/27.jpg)
Fixed-Function Integrated Circuits
Dual in-line package (DIP)
![Page 28: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/28.jpg)
Fixed-Function Integrated Circuits
Small-outline IC (SOIC)
![Page 29: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/29.jpg)
Fixed-Function Integrated Circuits
Flat pack (FP)
![Page 30: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/30.jpg)
Fixed-Function Integrated Circuits
Plastic-leaded chip carrier (PLCC)
![Page 31: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/31.jpg)
Fixed-Function Integrated Circuits
Leadless-ceramic chip carrier (LCCC)
![Page 32: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/32.jpg)
Introduction to Programmable Logic
![Page 33: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/33.jpg)
Introduction to Programmable Logic
SPLD—Simple programmable logic devicesCPLD—Complex programmable logic devicesFPGA—Field-programmable gate arrays
![Page 34: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/34.jpg)
Introduction to Programmable Logic
SPLD PAL (programmable array logic) GAL (generic array logic) PLA (programmable logic array) PROM (programmable read-only memory)
![Page 35: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/35.jpg)
Test and Measurement Instruments
Analog OscilloscopeDigital OscilloscopeLogic AnalyzerLogic Probe, Pulser, and Current ProbeDC Power SupplyFunction GeneratorDigital Multimeter
![Page 36: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/36.jpg)
Number Systems
![Page 37: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/37.jpg)
Decimal Numbers
The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9
The decimal numbering system has a base of 10 with each position weighted by a factor of 10:
![Page 38: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/38.jpg)
Binary Numbers
The binary number system has two digits: 0 and 1
The binary numbering system has a base of 2 with each position weighted by a factor of 2:
![Page 39: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/39.jpg)
Decimal-to-Binary Conversion
![Page 40: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/40.jpg)
Decimal-to-Binary Conversion
Sum-of-weights methodRepeated division-by-2 methodConversion of decimal fractions to binary
![Page 41: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/41.jpg)
Binary Arithmetic
![Page 42: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/42.jpg)
Binary Arithmetic
Binary additionBinary subtractionBinary multiplicationBinary division
![Page 43: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/43.jpg)
Complements of Binary Numbers
![Page 44: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/44.jpg)
Complements of Binary Numbers
1’s complements2’s complements
![Page 45: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/45.jpg)
Complements of Binary Numbers
1’s complement
![Page 46: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/46.jpg)
Complements of Binary Numbers
2’s complement
![Page 47: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/47.jpg)
Signed Numbers
![Page 48: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/48.jpg)
Signed Numbers
Signed-magnitude form1’s and 2’s complement formDecimal value of signed numbersRange of valuesFloating-point numbers
![Page 49: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/49.jpg)
Signed Numbers
Signed-magnitude form The sign bit is the left-most bit in a signed binary number A 0 sign bit indicates a positive magnitude A 1 sign bit indicates a negative magnitude
![Page 50: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/50.jpg)
Signed Numbers
1’s complement form A negative value is the 1’s complement of the corresponding positive
value
2’s complement form A negative value is the 2’s complement of the corresponding positive
value
![Page 51: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/51.jpg)
Signed Numbers
Decimal value of signed numbers Sign-magnitude 1’s complement 2’s complement
![Page 52: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/52.jpg)
Signed Numbers
Range of Values2’s complement form:
– (2n – 1) to + (2n – 1 – 1)
![Page 53: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/53.jpg)
Hexadecimal Numbers
![Page 54: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/54.jpg)
Hexadecimal Numbers
Decimal, binary, and hexadecimal numbers
![Page 55: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/55.jpg)
Hexadecimal Numbers
Binary-to-hexadecimal conversionHexadecimal-to-decimal conversionDecimal-to-hexadecimal conversion
![Page 56: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/56.jpg)
Hexadecimal Numbers
Binary-to-hexadecimal conversion1. Break the binary number into 4-bit groups2. Replace each group with the hexadecimal equivalent
![Page 57: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/57.jpg)
Hexadecimal Numbers
Hexadecimal-to-decimal conversion1. Convert the hexadecimal to groups of 4-bit binary2. Convert the binary to decimal
![Page 58: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/58.jpg)
Hexadecimal Numbers
Decimal-to-hexadecimal conversion Repeated division by 16
![Page 59: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/59.jpg)
Binary Coded Decimal (BCD)
![Page 60: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/60.jpg)
Binary Coded Decimal (BCD)
Decimal and BCD digits
![Page 61: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/61.jpg)
Digital Codes
![Page 62: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/62.jpg)
Digital Codes
Gray codeASCII code
![Page 63: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/63.jpg)
Digital Codes
Gray code
![Page 64: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/64.jpg)
Digital Codes
ASCII code (control characters)
![Page 65: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/65.jpg)
Digital Codes
ASCII code (graphic symbols 20h – 3Fh)
![Page 66: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/66.jpg)
Digital Codes
ASCII code (graphic symbols 40h – 5Fh)
![Page 67: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/67.jpg)
Digital Codes
ASCII code (graphic symbols 60h – 7Fh)
![Page 68: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/68.jpg)
Digital Codes
Extended ASCII code (80h – FFh)Non-English alphabetic charactersCurrency symbolsGreek lettersMath symbolsDrawing charactersBar graphing charactersShading characters
![Page 69: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/69.jpg)
Decoders
![Page 70: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/70.jpg)
Decoders
Binary decoder4-bit decoderBCD-to-decimal decoderBCD-to-7-segement decoder
![Page 71: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/71.jpg)
Decoders
Binary decoderThe output is 1 only when:
A0 = 1A2 = 0A3 = 0A4 = 1
This is only one of an infinite
number of examples
![Page 72: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/72.jpg)
Encoder/Decoder Vocabulary
ENCODER- a digital circuit that produces a binary output code depending on which of its inputs are activated.
DECODER- a digital circuit that converts an input binary code into a single numeric output.
![Page 73: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/73.jpg)
ENCODERS AND DECODERS
A0
A1
A2
A3
A4
A5
A6
A7
ENCODER
O0
O1
O2
A0
A1
A2
O0
O1
O2
O3
O4
O5
O6
O7
DECODER
ONLY ONE INPUT
ACTIVATED AT A TIME
BINARY CODE OUTPUT
BINARY CODE INPUT
ONLY ONE OUTPUT
ACTIVATED AT A TIME
![Page 74: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/74.jpg)
THE 8421 BCD CODE
BCD stands for Binary-Coded Decimal.
A BCD number is a four-bit binary group that represents one of the ten decimal digits 0 through 9.
Example:
Decimal number 4926 4 9 2 6
8421 BCD coded number 0100 1001 0010 0110
![Page 75: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/75.jpg)
ELECTRONIC ENCODER -
DECIMAL TO BCD
0
Decimal
to
BCD
Encoder
BCD output
Decimal input0 0 0 0
5
0 1 0 1
7
0 1 1 1
3
0 0 1 1
• Encoders are available in IC form.
• This encoder translates from decimal
input to BCD output.
![Page 76: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/76.jpg)
10 line to 4 line Encoder
![Page 77: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/77.jpg)
![Page 78: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/78.jpg)
ENCODER
1248
DECIMAL BINARY (BCD)
9 5V
8 5V
7 5V
6 5V
5 5V
4 5V
3 5V
2 5V
1 5V
74147I9I8I7I6I5I4I3I2I1
A0A1A2A3
10 line to 4 line Encoder
![Page 79: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/79.jpg)
0
1
2
3
4
5
6
7
8
9
DECODER
BINARY (BCD)
DECIMAL
1 0V
2 0V
4 0V
8 0V
74LS42
A3A2A1A0
9876543210
4 line to 10 line Decoder
![Page 80: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/80.jpg)
BCD-to-
7-Segment
Decoder/
Driver
DECODERS: BCD TO
7-SEGMENT DECODER/DRIVER
BCD input
0 0 0 0
Decimal outputLED
0 0 0 10 0 1 00 0 1 10 1 0 0
• Electronic decoders are available in IC form.
• This decoder translates from BCD to decimal.
• Decimals are shown on an 7-segment LED display.
• This IC also drives the 7-segment LED display.
![Page 81: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/81.jpg)
7-segment display
There are two types of 7segment LED displays; common - anode common - cathode
81
![Page 82: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/82.jpg)
In commonanode, the anode of all of the LEDs are tied together to positive of the power supply (Vcc) as shown
82
Common Anode
![Page 83: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/83.jpg)
Common Cathode
In commoncathode, the cathode of all of the LEDs are tied together to ground as shown.
83
GND
![Page 84: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/84.jpg)
BCD-to-
7-Segment
Decoder/
Driver
BCD inputDecimal output
0 0 1 1
?
Q #1- What is the decimal output from the decoder that appears on the 7-segment display?
Answer: 3
Q #2- What is the decimal output from the decoder that appears on the 7-segment display?
0 0 0 0
Answer: 0
Q #3- What is the decimal output from the decoder that appears on the 7-segment display?
1 0 0 1
Answer: 9
Q #4- What is the decimal output from the decoder that appears on the 7-segment display?
Answer: 7
0 1 1 1
Q #5- What is the decimal output from the decoder that appears on the 7-segment display?
Answer: 6
0 1 1 0
TEST
![Page 85: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/85.jpg)
![Page 86: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/86.jpg)
BCD-TO-SEVEN SEGMENT DECODER DRIVER
5V
abcdef g .
V+
74LS47A3A2A1A0
testRBI
gfedcba
RBO
![Page 87: 04-612-307 ระบบคอมพิวเตอร์และการเชื่อมโยงweerayuth.in.th/docFiles/04-612-307/ch01-rev2.pdf · BCD-to-7-Segment Decoder](https://reader034.vdocuments.mx/reader034/viewer/2022042207/5eaa6802c6c64676ff4bba0e/html5/thumbnails/87.jpg)