3 Logic Circuits

3 Logic Circuits - ELEC101 Logiccircuits1 2010/11Spring...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
ELEC 101 Logic circuits 1 2010/11 Spring Binary Number and Digital Logic (Chap 13.1-13.5) Binary Numbers: Decimal Number and Binary Number Convert Binary Number to Decimal Number Convert Decimal Number to Binary Number Convert Decimal Fraction to Binary Fraction Addition and Subtraction of Binary Numbers Negative Binary Number in 2's Complement Digital Logic: True/false statements Can be implemented using digital circuits Related to binary number operations
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ELEC 101 Logic circuits 2 2010/11 Spring Decimal Number and Binary Number When we write a decimal number 375, we mean 375 in base-10 : 375 10 = 3x10 2 + 7x10 1 + 5x10 0 = 300 + 70 + 5 = 375 10 A binary number is in base-2 . It can be converted to base-10 easily: 1011 2 = 1x2 3 + 0x2 2 + 1x2 1 + 1x2 0 = 1x8 + 0x4 + 1x2 + 1x1 = 8 + 0 + 2 + 1 = 11 10 Hence, 1011 in base-2 is equal to 11 in base-10.
Background image of page 2
ELEC 101 Logic circuits 3 2010/11 Spring Number in Base-r NOT IN EXAM An n-digit number with an m-digit fraction in base-r (or radix-r ) means a n–1 a n–2 …a 1 a 0 ·a –1 a –2 …a –m(r) = a n–1 r n–1 + a n–2 r n–2 + … + a 1 r 1 + a 0 r 0 + a –1 r –1 + a –2 r –2 + … + a –m r –m
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ELEC 101 Logic circuits 4 2010/11 Spring 1011 2 is a 4-bit number. For a 4-bit number, the smallest number is 0000 2 , and the largest number is 1111 2 , where 0000 2 = 0 10 1111 2 = 2 3 + 2 2 + 2 1 + 2 0 = 8 + 4 + 2 + 1 = 15 10 = 2 4 –1 In general, an n-bit number runs from 0 to 2 n – 1, which consists of 2 n numbers in total. Sometimes the base may not be specified, and one should infer it through the context of usage. n-bit Binary Numbers
Background image of page 4
ELEC 101 Logic circuits 5 2010/11 Spring For an n-bit binary number, the leftmost bit has the largest weight (2 n–1 ), and is called the most significant bit ( MSB ). The rightmost bit has the least weight (2 0 =1), and is the least significant bit ( LSB ). LSB and MSB For the 6-bit number 101 111, MSB = 1, LSB = 1. For the 8-bit number 0010 1111, MSB = 0, LSB = 1. For the 8-bit number 1001 1100, MSB = 1, LSB = 0. 1101 1110 MSB LSB
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ELEC 101 Logic circuits 6 2010/11 Spring remainder 2 / 234 2 / 117 0 LSB 2 / 58 1 2 / 29 0 2 / 14 1 2 / 7 0 2 / 3 1 11 MSB Convert Digital Number to Binary Number To convert a digital number to a binary number, short division is used. Hence, 234 10 = 1110 1010 2 PCS
Background image of page 6
ELEC 101 Logic circuits 7 2010/11 Spring To verify the previous calculation, we have 1110 1010 2 = 2 7 + 2 6 + 2 5 + 0 + 2 3 + 0 + 0 + 2 1 = 128 + 64 + 32 + 8 + 2 = 234 Note that in digital applications, 8 consecutive bits ( b ) are organized as 1 byte ( B ): 1 byte = 8 bits 1 B = 8 b Bits and Bytes
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ELEC 101 Logic circuits 8 2010/11 Spring 2 0 = 1 2 1 = 2 2 2 = 4 2 3 = 8 2 4 = 16 2 5 = 32 2 6 = 64 2 7 = 128 2 8 = 256 2 9 = 512 2 10 = 1024 = 1K 2 16 = 65,536 = 64K 2 20 = 1,048,576 = 1M 2 30 = 1,073,741,824 = 1G 2 32 = 4,294,967,296 = 4G Useful Exponents of 2 Common term
Background image of page 8
ELEC 101 Logic circuits 9 2010/11 Spring The digital world uses bits and bytes. For example, a 32-bit microprocessor uses 32-bit data for instructions, data transfer, computation, and addressing memory. A 32-bit address means that the memory has 4G addresses.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 35

3 Logic Circuits - ELEC101 Logiccircuits1 2010/11Spring...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online