numerical represantation

Recall that the ALU performs all the arithmetic and logic operations. To achieve this task it is must be capable of representing the operands as binary digits.

Signed representation of Integers

The popular scheme used to represent integers is called sign and magnitude representation. In this scheme, the most significant bit is reserved to represent the sign of the integer and the remaining bits used to represent its magnitude. Accordingly, the MSB is referred to as the sign bit.

 

E.g. 011011011 = + 11011011

With eight bits we may represent

+127 = 01111111

- 127 = 11111111

One’s complement is found by inverting all bits with the exception of the sign bit. For two’s complement, we perform the same operation and in addition, ‘1’ is added to the least significant bit position.

 

Floating Point Representation of Real Numbers

A Real number, when represented within the computer, has three parts.

 

  1. Sign bit

  2. Exponent (Abscissa)

  3. Mantissa (Significand or Fraction)

 

To represent a real number using single precision 4 bytes are used, i.e. 4*8=32 bits.

The structure of a Real number is as illustrated in Figure 6-2.

fig6-2.gif (16157 bytes)

 Figure 6-2 Arrangement of typical single precision Real number

 However for the IEEE16 standard, the mantissa is composed of 24 bits as indicated in the below table.

 

Part

Number of bits

Mantissa

24

Exponent

8

Sign

1

 

Simple arithmetic indicates that it would take 33 bits to store a 4-byte single precision number but we are only using 32.

How is this so

 

Although the mantissa is quoted as 24 bits only 23 bits are used. Normalisation allows us to discard the single ‘1’ bit to the left of the radix point (i.e. binary point for base 2). To illustrate, let us convert the decimal number 12 to binary and then normalise.

(12)10 = (1100)2

Normalising (1100)2 becomes (1.1x23)2

Notice that as a result of the normalisation all numbers will be written as 1.?????x2? and as a result the integer part does not have to be stored. The bits after the radix point are the only digits that are stored.

 

Another alteration is made to the Real number representation. In this instance, the exponent is stored as a Biased Exponent. A bias of +127 is added to the exponent.

 

Let us now look at a few examples of how Real numbers are represented.

  1. +12 (decimal)

Normalising the mantissa we get +1.1x23

Sign = 0 (+ve)

Exponent = 3+127 = 130

Mantissa = .1

Therefore the representation of +12 is:

positve12-representation.gif (28662 bytes)

  1. Similarly, for –12 we get:

 

negative12-representation.gif (26077 bytes)

 

To represent a real number using single precision 8 bytes are used, i.e. 8*8=64 bits.

The structure of a Real number is as illustrated in Figure 6-3.

fig6-3.gif (9856 bytes)

  Figure 6-3 Arrangement of typical double precision Real number

 With double precision the bias for the exponent is 1023.

 

There are 2 exceptions to the rules for floating point numbers (whether single or double precision)

  1. The number 0.0is stored as all zeros

  2. The number infinity is stored as all ones in the exponent and all zeros in the mantissa.

 

The sign bit indicates (+ /-) 0.0 or (+/-) infinity.

 

 

Introduction

The microprocessor is the logical evolution of the circuit designer’s need for circuits that have more functionality. Logic gates can be used to make a flip-flop, but it is easier and more efficient to use a flip-flop IC. Furthermore, a memory device can be made from flip-flops, but it is easier and more efficient to use a memory IC. Likewise, complex logic systems can be made from IC components, but the microprocessor was invented to integrate the function of many logic ICs into one multipurpose logic IC.

 History

Year

Company

Processor

1971

Intel

4004 (4 bit)

1974

Intel

8080 (8 bit)

1975

Motorola

6800 (8 bit)

 

With the increase in the number of bits came the benefits of increased speed and computing power. These bits determine the amount of data that can be input to or output from the processor. Currently, 32 bit processors are the norm.

 

Microprocessor Systems

 

A microprocessor is a Very Large Scale Integrated (VLSI) logic IC whose logical function is controlled be an instruction code. This instruction code is a specific combination of logic bits needed for a microprocessor to execute its logic operations. These codes may include instructions to perform logical, arithmetic or input/output operations.

 

A microprocessor system is one type of computer system. All computer systems have three basic functional blocks: a processing unit, memory, and input/output. In practice these components are connected together using either address bus, data bus or control lines. This is illustrated in Figure 6-1.

 

 fig6-1.gif (40828 bytes)

 Figure 6-1 Basic Microprocessor System

 

Central Processing Unit (CPU): Performs the computational tasks of the microprocessor system and the operation and timing of all the other microprocessor tasks. It contains:

Arithmetic and Logic Unit (ALU): Processes all arithmetic and logic functions

Control Unit: Responsible for the over all system timing and operation control and execution of the software program instructions.

Memory: This is typical Read only Memory (ROM) or Random Access Memory (RAM)

Input/Output units: Data is passed to and from external devices these units.

Address Bus: The address bus contains all the address lines of the microprocessor. All external memory and I/O devices requiring addressing are connected to the appropriate microprocessor address lines via the address bus. The address bus is unidirectional.

Data Bus: The transmission of all data to and from the microprocessor occurs on the data bus. Note that the data bus must be bi-directional.

انواع A/D

Successive aproximation

مدارات آنالوگ به دیجیتال و دیجیتال به آنالوگ(A/D , D/A)

Successive approximation ADC