Вы находитесь на странице: 1из 26

BITS Pilani presentation

BITS Pilani
Pilani Campus

Rekha.A Faculty

Course Outline
Digital design basics and number systems Binary logic gates Boolean algebra and K-map simplification Arithmetic logic units Flip-flops Registers and counters Introduction to microprocessors Architecture Instruction set and programming Memory and I/O interfacing Examples of system design
ESZC261 Digital Electronics and Microprocessors
BITS Pilani, Pilani Campus

Digital systems and Binary numbers

In Science , Technology, business we are constantly dealing with the quantities. Quantities are measured, monitored, recorded etc. It is important that we be able to represent their values efficiently and accurately. Two basic ways of representing the numerical values of the quantity: Analog and Digital. Analog representation of a quantity is represented by a voltage , current or meter movement that is proportional to the value of the quantity. Analog quantities can vary over a continuous range of values. In digital representation the quantities are represented by symbols called digits. It is discrete. Many number system are in use in Digital technology. Decimal, Binary, Octal and Hexadecimal.

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Decimal system: Composed of 10 numerals or symbols i.e 0,1,2,3,4,5,6,7,8,9. Also called base 10 system. In decimal system the value of the digit depends on its position . eg: 376 3 carries most weight and hence called MSD, 6 carries least weight and hence called LSD.

Binary system , there are only two symbols 0 &1. It is also called as base 2. Octal System : Composed of 8 symbols i.e 0-7 Hexadecimal System; Composed of 16 symbols i.e 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.

BITS Pilani, Pilani Campus

Digital System
Takes a set of discrete information inputs and discrete internal information (system state) and generates a set of discrete information outputs.

Discrete Inputs

Discrete Information Processing System

Discrete Outputs

System State

ESZC261 Digital Electronics and Microprocessors

BITS Pilani, Pilani Campus

Types of Digital Systems


No state present Combinational Logic System Output = Function(Input) State present State updated at discrete times => Synchronous Sequential System State updated at any time =>Asynchronous Sequential System State = Function (State, Input) Output = Function (State) or Function (State, Input)
ESZC261 Digital Electronics and Microprocessors
BITS Pilani, Pilani Campus

A Digital Computer Example


Memory

CPU

Control unit

Datapath

Inputs: Keyboard, mouse, modem, microphone

Input/Output

Outputs: CRT, LCD, modem, speakers

ESZC261 Digital Electronics and Microprocessors


BITS Pilani, Pilani Campus

Signal
An information variable represented by physical quantity. For digital systems, the variable takes on discrete values. Two level, or binary values are the most prevalent values in digital systems. Binary values are represented abstractly by: digits 0 and 1 words (symbols) False (F) and True (T) words (symbols) Low (L) and High (H) and words On and Off. Binary values are represented by values or ranges of values of physical quantities

ESZC261 Digital Electronics and Microprocessors


BITS Pilani, Pilani Campus

Signal Examples Over Time

Time Analog Digital Asynchronous Synchronous


Continuous in value & time Discrete in value & continuous in time Discrete in value & time

ESZC261 Digital Electronics and Microprocessors


BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Binary to Decimal
Binary number system is a positional system Illustration 1: 1 24 + Illustration 2 1 0 27 + 26

1 23

0 22

1 + 21 +

1 20

(binary) = 16+8+2+1=2710 (Decimal)

1 25

1 24

0 + 23 + 22

1 + 21

0 +

1 (Binary) 20 = 181(Decimal)

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Decimal to Binary : Conversion can be done by repeatedly dividing the decimal number by 2. Illustration 1; Convert the decimal number 25 to binary 25/2 = 12 + remainder of 1 12/2 =6 + remainder of 0 6/2 = 3 + remainder of 0 3/2= 1 + remainder of 1 (25)10 = (11001)2 Illustration 2: Convert the decimal number 37 to Binary 37/2 = 18 + remainder of 1 18/2 = 9 + remainder of 0 9/2 = 4 + remainder 1 4/2 =2 + remainder 0 2/2 = 1 + remainder 0 (37)10 = (100101)2
BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Octal Number system Octal to decimal conversion: An octal number can be converted to its decimal equivalent by multiplying each octal digit by its positional weight. Example: 3728 = 3*82 + 7*81 + 2*80 = 3*64 + 7*8 + 2*1 =25010 Decimal to Octal A decimal integer can be converted to octal by repeated division by 8 Example: Convert the decimal number 266 to Octal 266/8 = 33 + remainder 2 33/8 = 4 + remainder 1 26610 = 4128

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Octal to Binary conversion The primary advantage of the octal number is the ease with which the conversion can be made between the binary and the octal number Example: Convert the octal number 472 to binary 4 7 2 100 111 010 4728 = 1001110102 Example 2: Convert the octal number 2435 to binary 2 4 3 5 010 100 011 101 24358 = 0101000111012

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Binary to Octal Example: Convert the Binary number 100111010 to octal 100 111 010 4 7 2 1001111012 = 4728 Usefulness of octal system: when dealing with a large quantity of binary numbers of many bits, it is convenient and more efficient to write numbers in octal.

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

HEXADECIMAL
Hex to decimal conversion Example: Convert the (2AF)16 to decimal (2AF)16 = 2*162 + 10*161+ 15*160 = 512+160+15 = 68710

NUMBER

SYSTEM

Decimal to HEX conversion Example: Convert 42310to HEX 423/16 = 26 + remainder 7 26/16 = 1 + remainder 10 42310 = 1A716

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Binary to HEX Conversion Example: Convert (1110110010011110)2 to HEX 1110 1100 1001 1110 D C 9 D 11101100100111102 = DC9D16 HEX to Binary Example: Convert ( AFE5)16 to Binary A F E 5 1010 1111 1110 0101 AFE516 = 10101111111001012

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

HEX to OCTAL conversion Example: Convert B2F16 to octal B2F16 = 1011 = 101 0010 100 1111 (convert to binary) 101 111 (group into 3 bit groupings)

=5

7 (convert to octal)

BITS Pilani, Pilani Campus

Topic: Number systems and codes.


BCD Code If each digit of the decimal number is represented by its binary equivalent , the result is a code called Binary coded Decimal (BCD). Since a decimal digit can be as large as 9, four bits are required to code each digit. Suppose , 6 3 0110 0011

8 1000

(Decimal) (BCD)

ASCII ( American Standard code for Information Interchange) The ASCII code is a 7 bit code, so it has 27 possible code groups. This is more than enough to represent all the standard keyboard characters as well as the control functions such as <RETURN> , <LINEFEED>. The ASCII code is used for the transfer of alphanumeric information between a computer and the input/output devices.

BITS Pilani, Pilani Campus

American standard Code for Information Interchange(ASCII)

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Example1: Encode the following message in ASCII code using the HEX representation : COST = $72 Solution : 43 ,4F , 53,54, 20, 3D, 20, 24, 37, 32 Example 2: The following ASCII coded message is stored in successive memory locations in a computer 1010011 1010100 1001111 1010000 What is the message? Ans: STOP

BITS Pilani, Pilani Campus

GRAY CODE

The output data of many physical systems are quantities that are continuous The data must be converted to digital form before they are applied to the digital system The Advantage of the gray code over the straight binary code is that only one bit in the code group changes in going from one number to the next number. Gray code is also referred to as the reflected code The gray code is used in applications in which normal sequence of binary numbers may produce an error or ambiguity during the transition from one number to another.

BITS Pilani, Pilani Campus

ESZC261 Digital Electronics and Microprocessors


BITS Pilani, Pilani Campus

ESZC261 Digital Electronics and Microprocessors


BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Parity method for error detection The movement of binary data and codes from one location to another is the most frequent operation performed in the digital system. When ever the information is being transmitted from one device to another, there is possibility that error can occur such that the receiver does not receive the identical information that was sent. For this reason digital systems employ some method for detection of errors. One of the simplest and most widely used schemes for error detection is the parity method.

BITS Pilani, Pilani Campus

A parity bit is an extra bit that is attached to a code group that is being transferred from one location to another. The parity bit is made either 1 or 0. In the even parity method, the value of the parity bit is chosen so that the total number of 1s in the code (including the parity bit) is an even number. If the code is 1000011, the new code group including the parity bit becomes, 11000011. The odd parity method is used exactly the same way except that the parity chosen so that total no. of 1s is an odd number. If suppose the code is 1000010, then the code after the parity it is added becomes 11000010.

BITS Pilani, Pilani Campus

Topic: Number systems and codes.

Example 1: Attach an odd parity bit to the ASCII code for the $ symbol and express the result in hex decimal. Solution: The 7 Bit ASCII code for symbol $ is 010 0100 For odd parity the code becomes 1010 0100, Therefore Hexa decimal representation becomes A4. Example 2: Attach an even parity bit to the BCD code for decimal 69, Solution: BCD code for decimal 69 is 01101001 After adding the even parity the code becomes 001101001

BITS Pilani, Pilani Campus

Вам также может понравиться