week1 - 1 Week 1 Introduction to Computing and the 8051...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Week 1 Introduction to Computing and the 8051 Microcontrollers Chapters 0 and 1 2 ¡ 110.101 b = 6.625 ¡ 6A.C = 106.75 ¡ 10 = 1010 b ¡ 10 = 12 8 ¡ 0.125 = 0.001 b ¡ 0.78125 = 0.C8 h Binary and Hexadecimal Systems ¢ Conversion to decimal: ¡ 110.101 b = ? ¡ 6A.C h = ? ¢ Conversion from decimal ¡ for a whole number: divide by the radix and save the remainder as the significant digits ¡ 10 = ? B ¡ 10 = ? 8 ¢ Converting from a decimal fraction ¡ multiply the decimal fraction by the radix ¡ save the whole number part of the result ¡ repeat above until fractional part of step 2 is 0 ¡ 0.125 = ? b ¡ 0.78125 = ? h 3 Base 16 Number systems ¡ Represent 100111110101b in hex Group them 1001 1111 0101 9 F 5 hex ¡ Convert 1714d to binary 1714 = 16*107 +2 107 = 16*6 + 11 1714 = 6B2 h = 0110 1011 0010 b 4 Signed Representation-Two’s Complement ¡ If the number is positive make no changes ¡ If the number is negative, complement all bits and add by 1 ¢-6 => 0000 0110 + 1 = 1111 1001 + 1 = FAh ¡ 8 bit signed numbers ¢ 0 to 7Fh (+127) are positive numbers ¢ 80h (-128)to FFh (-1) are negative numbers ¡ Conversion of signed binary numbers to their decimal equivalent ¢ 1101 0001 • 1101 0001 + 1 = 0010 1110 + 1 = 0010 1111 = 2Fh => -47 ¢ 1000 1111 0101 1101 (16 bit signed number) • 0111 0000 1010 0010 + 1 = 0111 0000 1010 0011 = 70C3h => -28835 ¡ Two’s complement arithmetic ¢ +14 - 20 ¢ 0000 1110 + 0001 0100 + 1 = FAh ¡ Overflow: Whenever two signed numbers are added or subtracted the possibility exists that the result may be too large for the number of bits allocated Ex: +64 +96 using 8-bit signed numbers 5 Two’s complement Numbers in the range from -2 7 to 2 7-1 are represented by 8 bit signed arithmetic … … 7Fh 0111 1111b +127 01h 0000 0001b 1 00h 0000 0000b FFh 1111 1111b-1 FEh 1111 1110b-2 … … 82h 1000 0010b-126 81h 1000 0001b-127 80h 1000 0000 b-128 Hex Binary Decimal 6 ASCII ¡ The standard for text ¡ In this code each letter of the alphabet, punctuation mark, and decimal number is assigned a unique 7-bit code number ¡ With 7 bits, 128 unique symbols can be coded ¡ Often a zero is placed in the most significant bit position to make it an 8-bit code ¢ e.g., Uppercase A 41h ¡ Digits 0 through 9 are represented by ASCII codes 30h to 39h 7 ASCII - more 8 BCD ¡ BCD code provides a way for decimal numbers to be encoded in binary form that is easily converted back to decimal ¢ 26 (unsigned binary)=> 1Ah = 0001 1010 b ¢ 26 (BCD)=>26h=0010 0110 b ¢ 243 (unsigned binary)=> F3h= 1111 0011 b ¢ 243 (BCD)=>243h=> 0010 0100 0011 b ¡ Unpacked BCD: One byte to store each digit ¢ 243 (Unpacked BCD)=> 02 04 03h =>00000010 00000100 00000011 b 9 Digital Primer Inversion 10 AND and OR Gates 11 XOR Gate 12 Logic Design using Gates ¡ Two implementations of a half-adder 13 Full adder using half adders 14 3-bit adder using 3 full-adders 15 Multiplexer 16 N to 2 N Decoder 17 Address decoders 18 Latch ¡ The simplest memory element ¡ Level-sensitive : it memorizes the input data when there is a given level on the control input 19...
View Full Document

Page1 / 54

week1 - 1 Week 1 Introduction to Computing and the 8051...

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

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