Assignment Document

The 8051 Microcontroller and Embedded Systems

Pages:

Preview:


  • "The 8051 Microcontroller andEmbedded SystemsCHAPTER 0INTRODUCTION TOCOMPUTING1 OUTLINE? Numbering and coding systems? Digital primer? Inside the computer2 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Decimal and binary number systems– Human beings use ..

Preview Container:


  • "The 8051 Microcontroller andEmbedded SystemsCHAPTER 0INTRODUCTION TOCOMPUTING1 OUTLINE? Numbering and coding systems? Digital primer? Inside the computer2 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Decimal and binary number systems– Human beings use base 10 (decimal) arithmetic? There are 10 distinct symbols, 0, 1, 2, …, 9– Computers use base 2 (binary) system? There are only 0 and 1– Bits– Represent Voltage levels: ON and OFF3 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting from Decimal to Binary– Divide the decimal number by 2 repeatedly– Keep track of the remainders– Continue this process until the quotient becomeszero– Write the remainders in reverse order to obtainthe binary number4 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting from Decimal to Binary5 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting from Binary to Decimal– Know the weight of each bit in a binary number– Add them together to get its decimal equivalent6 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting from Binary to Decimal– Use the concept of weight to convert a decimalnumber to a binary directly7 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Hexadecimal System– Base 16, the hexadecimalsystem, is used as aConvenient representation ofbinary numbers? ex.– It is much easier to represent astring of 0s and 1s such as100010010110 as itshexadecimal equivalent of896H8 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting between Binary and Hex– To represent a binary number as its equivalenthexadecimal number? Start from the right and group 4 bits at a time, replacingeach 4-bit binary number with its hex equivalent9 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting between Binary and Hex– To convert from hex to binary? Each hex digit is replaced with its 4-bit binary equivalent10 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting from Decimal to Hex– Convert to binary first and then convert to hex– Convert directly from decimal to hex by repeateddivision, keeping track of the remainders11 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Converting from Hex to Decimal– Convert from hex to binary and then to decimal– Convert directly from hex to decimal by summingthe weight of all digits12 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Addition of Hex Numbers– Adding the digits together from the leastsignificant digits? If the result is less than 16, write that digit as the sum forthat position? If it is greater than 16, subtract 16 from it to get the digitand carry 1 to the next digit13 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? Subtraction of Hex Numbers– If the second digit is greater than the first, borrow16 from the preceding digit14 SECTION 0.1: NUMBERING ANDCODING SYSTEMS? 2’s Complement10011101binary number011000101’s complement+1Add 1 to result--------------011000112’s complement15 "

Related Documents

Start searching more documents, lectures and notes - A complete study guide!
More than 25,19,89,788+ documents are uploaded!

Why US?

Because we aim to spread high-quality education or digital products, thus our services are used worldwide.
Few Reasons to Build Trust with Students.

128+

Countries

24x7

Hours of Working

89.2 %

Customer Retention

9521+

Experts Team

7+

Years of Business

9,67,789 +

Solved Problems

Search Solved Classroom Assignments & Textbook Solutions

A huge collection of quality study resources. More than 18,98,789 solved problems, classroom assignments, textbooks solutions.

Scroll to Top