bài giảng kỹ thuật số ( điện)

145 288 1
bài giảng kỹ thuật số ( điện)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chương Hệ thống số đếm Chương HỆ THỐNG SỐ ĐẾM 1.1 Hệ thống số : Hệ thống số thường sử dụng hệ thống số có vị trí Trong hệ thống số biểu diễn chuỗi ký tự số (digit); Ở vị trí ký tự số có trọng số định Trọng số lũy thừa vị trí ký tự số chuỗi Cơ số số ký tự số dùng để biểu diễn hệ thống Các hệ thống số thường gặp hệ thống số thập phân (Decimal system), hệ thống số nhị phân (Binary system), hệ thống số bát phân (Octal system), hệ thống số thập lục phân (Hexa-decimal) v.v…Giá trị thập phân số tính theo công thức sau : n G = ∑ C × At + t t =0 m t′ C ∑ × At′ t ′ = −1 Trong : - G : giá trị - t : vị trí ký tự số đứng trước dấu ngăn cách thập phân (0, 1, 2, 3, …) - n : số ký tự số đứng trước dấu ngăn cách thập phân số trừ - C : số - A : ký tự số - t’ : vị trí ký tự số đứng sau dấu ngăn cách thập phân ( -1, -2, -3, …) - m : số ký tự số đứng sau dấu ngăn cách thập phân của1 số Trong hệ thống số người ta thường quan tâm đến số có ý nghĩa cao (số có trọng số lớn nhất) ký hiệu MSB (Most Significant Bit) số có ý nghĩa thấp (số có trọng số nhỏ nhất) ký hiệu LSB (Less Significant Bit) Ví dụ : Trang Chương MSD : Most Significant Digit 10010[2] MSB Hệ thống số đếm LSB LSD : Less Significant Digit 1998[10] 1.1.1.Hệ thống số đếm thập phân (Decimal) : • Ký tự số : 0, 1, 2, 3, 4, 5, 6, 7, 8, • Cơ số : 10 Vị trí Ví dụ : 1 9 9[10] = 1.103 + 9.102 + 9.101 + 9.100 = 1000 + 900 -1 + 90 + -2 , 5[10] = 1.100 + 2.10-1 + 5.10-2 = 1,00 + 0,2 + 0,05 1.1.2 Hệ thống số nhị phân (Binary) : • Ký tự số : 0, • Cơ số : Mỗi số số nhị phân (0 1) đưực gọi bit (viết tắt binary digit) Các đơn vị khác : Tên gọi Viết tắt Giá trị Byte B bit Kilo Byte KB 1024 byte = 210 B Mega Byte MB 1024 KB = 20 B Giga GB 1024 MB = 230 B Trang Chương Hệ thống số đếm Vị trí Ví dụ : 1 1[2] = 1.2 + 0.23 + 1.22 + 0.21 + 1.20 = 16 + + + + = 21[10] (Số nhị phân có bit) -1 -2 1 , -3 [2] = 1.21 + 1.20 + 1.2-1 + 0.2-2 + 1.2-3 = + + 0,5 + + 0,125 = 3,625[10] (Số nhị phân có bit) Nhận xét : - Nếu bit cuối ⇒ số nhị phân số chẳn - Nếu bit cuối ⇒ số nhị phân số lẻ 1.1.3 Hệ thống số bát phân (Octal) : • Ký tự số : 0, 1, 2, 3, 4, 5, 6, • Cơ số : Ví dụ : Vị trí 6[8] = 4.8 + 6.8 = 32 + = 38[10] -1 , -2 7[ 8] = 2.80 + 3.8-1 + 7.8-2 = + 3.0,125 + 7.0,02 = 2,515[10] 1.1.4 Hệ thống số thập lục phân (Hexa-decimal) : • Ký tự số : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F • Cơ số : 16 Trang Chương Hệ thống số đếm Ví dụ : Vị trí E[16] = 2.161 + 14.160 = 46[10] -1 C , D[16] = 0.163 + 1.162 + 2.161 + 12.160 + 13.16-1 = + 256 + 32 + 12 + 0,0625 = 300,0625[10] Ghi : Nếu số haxa-decimal bắt đầu chữ viết phải thêm số vào trước (Vd : EF → 0EF) 1.2 Chuyển đổi số : 1.2.1 Chuyển đổi số nhị phân, bát phân, thập lục phân sang số thập phân: Nguyên tắc : lấy số hạng chuỗi số nhân với số lũy thừa vị trí sau lấy tổng tất ⇒ kết (các ví dụ trên) 1.2.2 Chuyển đổi số từ nhị phân sang thập lục phân : Nguyên tắc : Nhóm từ phải qua trái đủ bốn số (bốn bit); nhóm cuối thiếu ta thêm số vào Thay nhóm bit thành mã thập lục phân tương ứng Ví dụ : 0010 1101[2] = 2D[16] D 1100 1010 1111 1110 1101 1010[2] = 0CAFEDA[16] C A F E D A Trang Chương Hệ thống số đếm Bảng mã thập lục phân : Thập phân Nhị phân Thập lục phân 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F 1.2.3 Chuyển đổi số từ nhị phân sang bát phân : Nguyên tắc : Nhóm từ phải qua trái đủ ba số (ba bit); nhóm cuối thiếu ta thêm số vào Thay nhóm ba bit thành mã thập lục phân tương ứng Trang Chương Hệ thống số đếm Ví dụ : 100 111 010[2] = 472[8] 001 000[2] = 10[8] 1.2.4 Chuyển đổi số từ bát phân sang nhị phân : Nguyên tắc : Thay ký tự số số nhị phân ba bit tương ứng theo bảng sau Bát phân Nhị phân 000 001 010 011 100 101 110 111 Ví dụ : 011 5[8] = 11100101[2] 100 101 001 7[8] = 1011111[2] 011 111 1.2.5 Chuyển đổi số từ thập lục phân sang nhị phân : Nguyên tắc : Thay ký tự số số nhị phân bốn bit tương ứng Ví dụ : F E (H) = 1011111110[2] 0010 1111 1110 1.2.6 Chuyển đổi số thập phân sang số nhị phân, bát phân, thập lục phân : Chia làm hai phần : phần nguyên (phần N) phần thập phân (phần L) * Phần nguyên N : - Lấy N chia cho số (2 hoặc 16), thương số N0, số dư n0 - Lấy N0 chia cho số (2 hoặc 16), thương số N1, số dư n1 - Lấy N1 chia cho số (2 hoặc 16), thương số N2, số dư n2 Trang Chương Hệ thống số đếm - Tiếp tục chia thương số Ni = 0, số dư ni Khi số N biểu diễn dạng nhị phân : N[2] = ni ni-1 … n2 n1 n0 (Các số dư lấy theo thứ tự từ lên) Ví dụ : 64[10] = ?[2] 35[10] = ?[2] 35 64 17 32 16 8 4 2 2 2 1 = 1000000[2] = 100011[2] Ví du ï2 : Trang Chương 16 = 1997[10] 423[10] 16 Hệ thống số đếm = 1A7[16] 7CD[16] 13 124 16 12 26 16 16 10 1 16 Ví dụ : 266[10] = 412[8] 1999[10] = 3717[8] 33 8 249 31 8 * Phần thập phân L : - Lấy phần L nhân số thành L’ có phần nguyên d1, phần thập phân L - Lấy phần L1 nhân số thành L1’ có phần nguyên d2, phần thập phân L2 - Lấy phần L2 nhân số thành L2’ có phần nguyên d3, phần thập phân L3 - Tiếp tục phần thập phân tích số hay đạt số lẻ cần thiết Khi phần lẻ : L[2] = d1 d2 d3 d4 … dk Trang Chương Ví dụ : Hệ thống số đếm L[10] = 0.6875 ⇒ L[2] _ 0.6875 x = 1.3750 (L’) ⇒ d1 = 1; L1 = 0.3750 _ 0.3750 x = 0.750 (L1’) ⇒ d2 = 0; L2 = 0.750 _ 0.750 x = 1.50 (L2’) ⇒ d3 = 1; L3 = 0.50 _ 0.50 x = 1.0 (L3’) ⇒ d4 = 1; L4 = ⇒ L[2] = 0.1011 Ví dụ : L[10] = 0.6875 ⇒ L[8] _ 0.6875 x = 5.5 (L’) ⇒ d1 = 5; L1 = 0.5 ⇒ d2 = 4; L2 = _ 0.5 x = 4.0(L1’) ⇒ L[8] = 0.54 Ví dụ : L[10] = 0.6875 ⇒ L[16] _ 0.6875 x 16 = 11 (L’) ⇒ d1 = B; L1 = ⇒ L[16] = 0.B 1.2.3 Các phép toán nhị phân : Cũng số học thập phân, số học nhị phân có bốn phép tính : Cộng (+), Trừ (-), Nhân (*), Chia (/) 1.2.3.1 Phép toán cộng : Trang Chương Nguyên tắc : Hệ thống số đếm 0+0=0 0+1=1 1+0=1 + = nhớ (carry) Ví dụ : 100110 + 001 100111 1.2.3.2 Phép toán trừ : Nguyên tắc : 1010110 + 1000101 1001010 + 1010010 10011011 10011100 0–0=0 – = mượn (borrow) 1–0=1 –1 = Ví dụ : 1111 - 0110 1001 1000 - 0011 0101 1.2.3.3 Phép toán nhân : Nguyên tắc : x = 0 x = x = x = Trang 10 Phụ lục 14-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-120, 0.150 Narrow Package Number M14A Trang 133 DM74LS08 Physical Dimensions inches (millimeters) unless otherwise noted DM74LS08 Phụ lục Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 14-Lead Small Outline Package (SOP), EIAJ TYPE II, 5.3mm Wide Package Number M14D Trang 134 Phụ lục DM74LS08 Quad 2-Input AND Gates Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 14-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide Package Number N14A Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild reserves the right at any time without notice to change said circuitry and specifications FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION As used herein: Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the user A critical component in any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness Trang 135 www.fairchildsemi.com Phụ lục DM74LS11 Triple 3-Input AND Gate General Description This device contains three independent gates each of which performs the logic AND function Devic es also availa ble in Tape and Reel Specify by appe nding the suffix letter “X” to the ordering code Connection Diagram Function Table Y = ABC Inputs B C Y X X L L X L X L L X X L H H H H H = HIG H Logic Level L = LOW Logic Level X = Either LOW or HIG H Logic Level © 2000 Fairchild Semiconductor Corporation DS006350 Trang 136 Output A DM74LS11 Triple 3-Input AND Gate August 1986 Revised March 2000 DM74LS11 Phụ lục Absolute Maximum Ratings(Note 1) Supply Voltage Note 1: The “ Absolute Maximum Ratings” are those values beyond which the safety of the devic e cannot be guaranteed The devic e should not be operated at these li mits The para metric values defined in the Ele ctrical Characteristics tables are not guaranteed at the absolute maxi mum ratings The “Reco mme nded O perating Conditions” table will define the conditio ns for actual device operation 7V Input Voltage 7V 0°C to +70°C Operating Free Air Temperature Range −65°C to +150°C Storage Temperature Range Recommended Operating Conditions Symbol Parameter Min Nom Max Units 4.75 5.25 V VCC Supply Voltage VIH HIGH Level Input Voltage VIL LOW Level Input Voltage 0.8 V IOH HIGH Level Output Current −0.4 mA IOL LOW Level Output Current mA TA Free Air Operating Temperature 70 °C V Electrical Characteristics over recommended operating free air temperature range (unless otherwise noted) Symbol Parameter Conditions VI Input Clamp Voltage VCC = Min, II = −18 mA VOH HIGH Level VCC = Min, IOH = Max Output Voltage VIH = Min LOW Level VCC = Min, IOL = Max Output Voltage VIL = Max VOL Min Typ (Note 2) 2.7 Max Units −1.5 V 3.4 IOL = mA, VCC = Min V 0.35 0.5 0.25 0.4 V II Input Current @ Max Input Voltage VCC = Max, VI = 7V 0.1 II H HIGH Level Input Current VCC = Max, VI = 2.7V 20 µA IIL LOW Level Input Current VCC = Max, VI = 0.4V −0.36 mA IOS Short Circuit Output Current VCC = Max (Note 3) −100 mA ICC H Supply Current with Outputs HIGH VCC = Max 1.8 3.6 mA ICCL Supply Current with Outputs LOW VCC = Max 3.3 6.6 mA −20 mA Note 2: All ty picals are at VCC = 5V, T A = 25°C Note 3: Not more than one output should be shorted at a ti me, and the duration should not exceed one second Switching Characteristics at VCC = 5V and TA = 25°C RL = kΩ Symbol tPL H CL = 15 pF Parameter Min Max 13 18 ns 11 18 ns Propagation Delay Time Propagation Delay Time HIGH-to-LOW Level Output www.fairchildsemi.com Units Max LOW-to-HIGH Level Output tP HL CL = 50 pF Min Trang 137 Phụ lục 14-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-120, 0.150 Narrow Package Number M14A Trang 138 DM74LS11 Physical Dimensions inches (millimeters) unless otherwise noted DM74LS11 Triple 3-Input AND Gate Phụ lục Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 14-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide Package Number N14A Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild reserves the right at any time without notice to change said circuitry and specifications LIFE SUPPORT POLICY FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION As used herein: Life support devices or systems are devices or systems A critical component in any component of a life support which, (a) are intended for surgical implant into the device or system whose failure to perform can be reabody, or (b) support or sustain life, and (c) whose failure sonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the www.fairchildsemi.com user Trang 139 Phụ lục Hex Schmitt-Trigger Inverter This device contains six independent gates each of which performs the logic INVERT function Each input has hysteresis which increases the noise immunity and transforms a slowly changing input signal to a fast changing, jitter free output ORDERING INFORMATION SL74LS14N Plastic SL74LS14D SOIC TA = 0° to 70° C for all packages LOGIC DIAGRAM PIN ASSIGNMENT FUNCTION TABLE PIN 14 =VCC PIN = GND Trang 140 Inputs Output A Y L H H L Phụ lục MAXIMUM RATINGS * Symbol Paramete r Value Unit 7.0 V VCC Supply Voltage VIN Input Voltage 7.0 V VOUT Output Voltage 5.5 V Tstg Storage Temperature Range -65 to +150 °C * Maximum Ratings are those values beyond which damage to the device may occur Functional operation should be restricted t o the Recommended Operating Conditions RECOMMENDED OPERATING CONDITIONS Symbol Paramete r Min Max Unit 4.75 5.25 V VCC Supply Voltage IOH High Level Output Current -15 mA IOL Low Level Output Current 24 mA TA Ambient Temperature Range +70 °C DC ELECTRICAL CHARACTERISTICS over full operating conditions Guaranteed Limit Min Max Unit VT+ - r Positive-Going Input Threshold Voltage VCC = V 0.5 V VT- - Negative-Going Input Threshold Voltage VCC = V 1.4 1.9 V Hysteresis VCC = V 0.4 VIK Input Clamp Voltage VCC = min, IIN = -18 mA VOH High Level Output Voltage VCC = min, IOH = -0.4 mA, VI=0.5 V VOL Low Level Output Voltage VCC = min, IOL = mA VI=1.9 V 0.4 VCC = min, IOL = mA VI=1.9 V 0.5 VCC = max, VIN = 2.7 V 20 µA VCC = max, VIN = 7.0 V 0.1 mA -0.4 mA -100 mA 16 mA Symbol VT+ - VT- IIH Paramete High Level Input Current Test Conditions IIL Low Level Input Current VCC = max, VIN = 0.4 V IO Output Short Circuit Current VCC = max, VO =0 V (Note 1) ICC Supply Current VCC = max Total with outputs high Total with outputs low V -1.5 2.7 -20 V 21 Trang 141 V V Phụ lục Note 1: Not more than one output should be shorted at a time, and the duration should not exceed one second AC ELECTRICAL CHARACTERISTICS (TA = 25°C, VCC = 5.0 V, CL = 15 pF, RL = kΩ , t r = 15 ns, t f = 6.0 ns) Symbol t PLH Paramete r Output Y Propagation Delay, Input A to t PHL Propagation Delay, Input A to Output Y Min Figure Switching Waveforms NOTES A CL includes probe and jig capacitance B All diodes are 1N916 or 1N3064 Figure Test Circuit Trang 142 Max Unit 22 ns 22 ns Phụ lục DM74LS20 Dual 4-Input NAND Gate S L S June 1986 Revised March 2000 DM74LS20 Dual 4-Input NAND Gate General Description This device contains two independent gates each of which performs the logic NAND function by appending the suffix letter “X” to the ordering code Connection Diagram Function Table Y = ABCD Inputs Output A B C D Y X X X L H X X L X H X L X X H L X X X H H H H H L H = HIG H Logic Level L = LOW Logic Level X = Either LOW or HIG H Logic Level © 2000 Fairchild Semiconductor Corporation DS006355 Trang 143 www.fairchildsemi.com DM74LS20 Phụ lục Absolute Maximum Ratings(Note 1) Supply Voltage Note 1: The “ Absolute Maximum Ratings” are those values beyond which the safety of the devic e cannot be guaranteed The devic e should not be operated at these li mits The para metric values defined in the Ele ctrical Characteristics tables are not guaranteed at the absolute maxi mum ratings The “Reco mme nded O perating Conditions” table will define the conditio ns for actual device operation 7V Input Voltage 7V 0°C to +70°C Operating Free Air Temperature Range −65°C to +150°C Storage Temperature Range Recommended Operating Conditions Symbol Parameter Min Nom Max Units 4.75 5.25 V VCC Supply Voltage VIH HIGH Level Input Voltage VIL LOW Level Input Voltage 0.8 V IOH HIGH Level Output Current −0.4 mA IOL LOW Level Output Current mA TA Free Air Operating Temperature 70 °C V Electrical Characteristics over recommended operating free air temperature range (unless otherwise noted) Symbol Parameter Conditions VI Input Clamp Voltage VCC = Min, II = −18 mA VOH HIGH Level VCC = Min, IOH = Max, Output Voltage VIL = Max VOL LOW Level VCC = Min, IOL = Max, Output Voltage VIH = Min Min Typ (Note 2) 2.7 Max Units −1.5 V 3.4 IOL = mA, VCC = Min V 0.35 0.5 0.25 0.4 V II Input Current @ Max Input Voltage VCC = Max, VI = 7V 0.1 II H HIGH Level Input Current VCC = Max, VI = 2.7V 20 µA IIL LOW Level Input Current VCC = Max, VI = 0.4V −0.36 mA IOS Short Circuit Output Current VCC = Max (Note 3) −100 mA ICC H Supply Current with Outputs HIGH VCC = Max 0.4 0.8 mA ICCL Supply Current with Outputs LOW VCC = Max 1.2 2.2 mA −20 mA Note 2: All ty picals are at VCC = 5V, T A = 25°C Note 3: Not more than one output should be shorted at a ti me, and the duration should not exceed one second Switching Characteristics at VCC = 5V and TA = 25°C RL = kΩ Symbol tPL H CL = 15 pF Parameter Min Max 10 15 ns 10 15 ns Propagation Delay Time Propagation Delay Time HIGH-to-LOW Level Output www.fairchildsemi.com Units Max LOW-to-HIGH Level Output tP HL CL = 50 pF Min Trang 144 Phụ lục 14-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-120, 0.150 Narrow Package Number M14A Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 14-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide Package Number N14A Trang 145 DM74LS20 Physical Dimensions inches (millimeters) unless otherwise noted Phụ lục Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild reserves the right at any time without notice to change said circuitry and specifications LIFE SUPPORT POLICY FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION As used herein: Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the user A critical component in any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness Trang 146 www.fairchildsemi.com Phụ lục Trang 147 [...]... 1000 1.4 Số có dấu _ Bù 1 _ Bù 2 : 1.4.1 Số có dấu (signed number) : Trang 15 Chương 1 Hệ thống số đếm Khi biểu diễn số có dấu thơng thường sử dụng thêm 1 bit gọi là bit dấu (thường đặt ở vị trí số có trọng số cao nhất MSB) : bit này là khơng (0 ) để chỉ số dương;bit này là một (1 ) để chỉ số âm Ví dụ : 1 0101 = - 5 Bit dấu 0 0101 = + 5 1.4.2 Số bù 1 Số bù 1 được định nghĩa cho một số N có n số sẽ bằng... →186 1.4.3 Số bù 2: Số bù 2 được định nghĩa cho một số N có n số sẽ bằng : r n – N (với r là cơ số) Từ định nghĩa trên ta có số bù 2 chính là số bù 1 cộng 1 Ví dụ : 1) 2) * Nhò phân : 1010 [2] (Bù  → 0101 (Bù  → 0110 7) 8) * Bát phân : 234 [8]  (Bù  → 355  (Bù  → 356 9) 10) * Thập phân : 15249 [10] (Bù  → 84750 (Bù  → 84751 15) 16) * Thập lục phân : 45[16] (Bù  → 186 (Bù  →... tốn nhân (AND), cộng (OR), bù (NOT) biểu thị quan hệ giữa các biến trong hàm Có hai dạng để biểu diễn hàm số, đó là dạng chuẩn 1 (tổng các tích hay tích chuẩn - Minterm) ký hiệu là m và dạng chuẩn 2 (tích các tổng chuẩn hay tổng chuẩn – Maxterm) ký hiệu là M Ví dụ : f(A,B, C) = ∑ (1 ,2,5) = A B C + A B C + A B C = m1 + m 2 + m 5 (Dạng chuẩn 1) f(A,B, C) = ∏ (0 ,3,7) =(A + B + C) (A + B + C) ( A + B +... cho một số N có n số sẽ bằng : r n -1 – N (với r là cơ số) 1.4.2.1 Hệ thống số nhị phân (bù 1) : Cho số N = 1010 [2] (r = 2; n = 4) rn = 2 4 = 10000 rn – 1 - N = 10000 – 1 – 1010 = 1111 – 1010 = 0101 Bù1) 1010 ( →0101 Lưu ý : Ta có thể tìm bù 1 của một số nhị phân đơn giản bằng cách thay 0 à 1; 1 à 0 1.4.2.2 Hệ thống số bát phân (bù 7) : Cho số N = 234 [8] (r = 8; n = 3) rn = 8 3 = 512=1000[8] à rn... Bù7) 234 ( → 355 1.4.2.3 Hệ thống số thập phân (bù 9) : Cho số N = 15249[10] (r = 10; n = 5) Trang 16 rn = 10 5 = 100000 Chương 1 Hệ thống số đếm à rn – 1 - N = 100000 – 1 – 15249 = 99999 – 15249 = 84750 Bù9) 15249 ( → 84750 1.4.2.4 Hệ thống số thập lục phân (bù 15) : Cho số N = 45[16] (r = 16; n = 2) rn = 16 2 = 256=100[16] à rn – 1 - N = 100 – 1 – 45 = 0FF – 45 = 0BA[16]=186 Bù15) 45 (  →186... Chương 2 Đại số Boole và cổng Logic Chương 2 ĐẠI SỐ BOOLE VÀ CỔNG LOGIC 2.1 Đại số Boole : 2.1.1 Định nghĩa : Đại số Boole (hay còn gọi là đại số logic do George Boole, nhà tốn học người Anh, sáng tạo vào thế kỷ XIX) là một cấu trúc đại số được xây dựng trên tập các phần tử nhị phân (Binary) cùng với 2 phép tốn cộng và nhân thỏa các điều kiện sau : a) Kín với các phép tốn cộng (+ ) và nhân (* ).Tức là... phép cộng sẽ có phần tử trung hòa 0 ( ồng nhất) : x + 0 = x ii- Đối với phép tốn nhân sẽ có phần tử trung hòa 1 ( đồng nhất) : x * 1 = x c) Giao hốn : i- x + y = y + x ii- x y = y x d) Phân bố và kết hợp : i- a (b + c) = (a b) + (a c) ii- a + (b c) = (a + b) (a + c) e) Ln ln tồn tại một phần tử nghịch (bù) sao cho : i- x + x = 1 ii- x x = 0 Trang 19 Chương 2 Đại số Boole và cổng Logic + Ghi chú:... thức 7-1: x.x = 0 Cơng thức 7-2: x + x = 1 Biến số ở đây đặt là x, hai hằng số Logic là 0 và 1 c) Luật giao hốn : Cơng thức 8-1: x + y = y+ x Cơng thức 8-2: x y = y x d) Luật kết hợp : Cơng thức 9-1: (x y).z = x.(y z) Cơng thức 9-2: (x + y) + z = x + (y+ z) Cơng thức 10-1: x (y + z) = x.y+x.z Cơng thức 10-2: x + y z = (x+y) (x +z) Trang 21 Chương 2 Đại số Boole và cổng Logic e) Luật phân phối : Cơng... thiết bị xuất hay nhập ( hiển thị) thường làm việc ở hệ thống thập phân Vì thế các giá trị thập phân phải được mã hóa bằng các giá trị nhị phân 1.3.1 Mã BCD (Binary Coded Decimal) : Mã số BCD là số thập phân mã hóa theo nhị phân Mã số này dùng nhóm bốn bit để biểu thị số thập phân từ 0 đến 9 Ví dụ : 1 2 0 (D) 1 9 9 9 (D) 0 0 0 1 0 0 1 0 0 0 0 0(BCD) 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1(BCD) Lưu ý: Mã BCD chỉ... 6, 7) F2 = ( x + y + z ) ( x + y + z ) ( x + y + z ) ( x + y + z ) = M0 M2 M3 = Π (0 , 2, 3, 6) 2.4 Các cổng logic : 2.4.1.Cổng khơng đảo: Ký hiệu A X=A Bảng giá trị (Truth table) A X 0 0 1 1 2.4.2.Cổng đảo (NOT gate ) Ký hiệu Trang 30 M6 M7 Chương 2 Đại số Boole và cổng Logic A Bảng giá trị (Truth table) A 0 1 X= A 1 0 2.4.3.Cổng AND (AND gate) A X=A.B B Bảng giá trị (Truth table) A B X 0 0 0

Ngày đăng: 02/05/2016, 23:39

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan