×

Fixed and Floating-Point Number

Fixed and Floating-Point Number: In digital technology, data is stored in memory registers with binary bits 0’s and 1’s because the computer only understands binary language. When we enter data in the system, it is converted into binary bits, and it is processed and used in the CPU in different ways. Memory registers have a format and a specific range to store data. Scientists have designed a real number representation method in memory registers of 8 bit, 16 bit, 32bit.

There two types of approaches that are developed to store real numbers with the proper method.

  • Fixed point number
  • Floating point number
Fixed and Floating-Point Number

Fixed point representation

In computing, fixed-point number representation is a real data type for a number. With the help of fixed number representation, data is converted into binary form, and then data is processed, stored and used by the system.  

Fixed point representation of data

Fixed and Floating-Point Number

Sign bit -The fixed-point numbers in binary uses a sign bit. A positive number has a sign bit 0, while a negative number has a sign bit 1.

Integral Part – The integral part is of different lengths at different places. It depends on the register's size, like in an 8-bit register, integral part is 4 bits.

Fractional part – Fractional part is also of different lengths at different places. It depends on the register's size, like in an 8-bit register, integral part is of 3 bits.

8 bits =  1Sign bit + 4 bits(integral) + 3bits (fractional part)

16 bits =  1Sign bit + 9 bits(integral) +6 bits (fractional part)

 32 bits =  1Sign bit + 15 bits(integral) + 9 bits (fractional part)

How to write the number in Fixed-point notation?

Number is 4.5

Step 1:- Convert the number into binary form.

                 4.5 = 100.1

Step 2:- Represent binary number in Fixed point notation

Fixed and Floating-Point Number

The smallest negative number in fixed-point representation.

     1   1    1     1     1    1     1     1

Smallest negative number = -15.875

The largest number in fixed-point representation.

    0     1       1       1    1     1      1    1

Larger number = +15.875

Note:- Range of fixed-point notation is from -15.875 to  +15.875. We conclude that the fixed-point notation range is very less as we can only represent the number in a set limit. It is not suitable for presenting a large amount of data, so it is not used in computer nowadays.

Therefore, scientists feel that the system needs a new representation format with the least or no limit because data is becoming a vast nowadays. So, floating-point representation came into existence.

Floating-point representation

To discard the limitation of fixed-point notation, floating-point number representation was developed by scientists. The computer system uses floating-point numbers representation to convert input data into binary form. The binary form number is converted into ‘scientific notation,' and then this scientific notation is converted into floating-point representation.

The floating-point notation has two types of notation

  1. Scientific notation
  2. Normalized notation

Scientific notation – Method of representing binary numbers into a x be form. Scientific notation is further converted into floating-point notation because floating-point notation only accepts scientific notation. For example:-

Number = 376.423 ( its not scientific notation)

Number in scientific = 36.4423 x 101 or 3.64423 x 102

Fixed and Floating-Point Number

For example:-    32.625 x 103

                           1101.101 * 2101  

where 1101.101 is the mantissa part.

2101 = It is the base part where we need not explicitly represent radix or base because the binary base is always 2.

Note: The major problem in this notation is while storing mantissa, we need to tell the decimal position every time to the processor. So to overcome this problem, normalized notation was invented and used.

Normalized notation- It is a special case of scientific notation. Normalized means after the decimal point, we have atleast one non-zero digit. 

 Normalized notation  -            

Fixed and Floating-Point Number

                            where, value of m= .1?m?1, b= base, e= exponent integer

                                           ± 0.1bbbb…..b  * 2±e

If mantissa =101, then the processor will interpret it as 0.101 itself, so it's not necessary to tell the position of the decimal point every time to the processor. 

For example-   .36 x 1035 is a normalized notation in which the value of m is between .1 to 1. In normalized notation, value of m remains between .1 ?m?1.

For example:-   1101.101 * 2101 = (5)10  (convert this into normalized form)

                          0.1101101 * 2(1001)2 =(9)10=(5+4)10

So, there is no need to tell about the decimal point's position every time to the processor.

  • Zero (0) cannot be represented or normalized because the representation set starts from 0.1, so how can we normalize zero. It’s not possible.
  •  If the most significant bit of mantissa is a non zero, then such a representation is called normalized floating-point.

So, four things are used to represent a floating-point number: -

  1. Sign of Mantissa
  2. Sign of Exponent
  3. Magnitude of Mantissa
  4. Magnitude of Exponent

How to represent a number in floating-point representation?

Floating-point representation of data in a 16-bit register.

Fixed and Floating-Point Number

Sign bit -The fixed-point numbers in binary uses a sign bit. A positive number has a sign bit 0, while a negative number has a sign bit 1. In floating-point representation, sign of a number always depends on mantissa, not on exponent. Hence sign bit in the format is always for mantissa and not for the exponent. 

Mantissa Part –Mantissa part is of different length at a different place. It depends on the size of the register like in 16-bit register; mantissa part is of 8 bits.

Exponent part – Exponent is the power of the number. It depends on the register's size; like in the 16-bit register, exponent part is 7 bits. Excess 16,64,128, 512  are used to store exponent in this format.

Steps for representing the number in Floating point format

Step 1: Convert the given number into binary.

              6.25 = 110.01

Step 2: Normalize the number  = .11001 * 23  ( base is 2)

Step 3: Represent the number in a 16-bit register in floating-point notation.

 0110010001000011

This represent value = 6443H

Largest  normalized number in 16 bit register with excess 64

0111111111111111

    =   .11111111* 2127-64  ( excess- 64 is used to store exponent in this format)

    =   .11111111* 263

    =    27 -1 * 263

Smallest  normalized number in 16 bit register with excess 64

0100000000000000

    =   .1* 20-64  ( excess- 64 is used to store exponent in this format)

    =   .1* 2-64

    =    .5 * 264

    =    2-65

De-normalized Notation

It is just reverse of normalized notation. In normalized notation, after decimal we have‘1’ written in the equation but in de-normalized notation, we have ‘0’ after decimal. For example:-

Largest De-normalized number with excess-64

Sign bitExponent Mantissa

      0                                         1111111                              01111111

= .01111111 * 2127-64

= .01111111 * 263

= .1111111 * 262

= (1-2-7 )* 262

Smallest  De-normalized number with excess-64

Sign bitExponent    Mantissa

      0                                         1000000                              0000000

= .00000001 * 20-64

= .00000001 * 2-64

= 2-8 * 2-64

= 2-72


Related Topics

CPU Registers

CPU Registers Within the CPU, we have small- small storage units called registers. If we are executing a certain program within the CPU, there's a need to store that program content,...

11 minutes read.

COA: Interrupt and its types

Introduction: In general terms, the word interrupt means to stop the progress of ongoing work in between or to break the continuation of the work. In early digital computing, the...

5 minutes read.

Machine Instructions

What is a Digital Computer? A computer that takes input in a binary form and produces output in binary form. The question arises of what kind of input the computer takes...

4 minutes read.

8085 Pin Configuration

Introduction: Intel 8085 is consist 40 pin IC. The pin name of 8085 is A8 – A15; AD0 – AD7; ALE; IO/M; S0, S1; RD; WR; READY; HOLD; HLDA; INTR; INTA;...

6 minutes read.

Digital Number System

Digital Number System: The computer understands digital language only. Many number systems are used in digital technology. The most common are Decimal, Binary, Octal and Hexadecimal number systems. Types of the...

7 minutes read.

8086 Microprocessor Pin Configurations

8086 microprocessor is invented and developed by Intel in 1976. The 8086 Microprocessor is an enhanced version of the 8085 Microprocessor. There are 20 address lines and 16 data lines...

6 minutes read.

Computer Organization and Architecture Data Formats

Data Formats In the digital world, everything is based on digits. In every method, the calculation is processed on the digits, and most importantly, the computer only understands the binary language...

6 minutes read.

Addressing Modes

Introduction: Addressing Modes An instruction consists of two parts opcode and operands. Opcode tells the operation going to perform, and operand information is the address of the operand. The CPU interprets...

8 minutes read.

8255 Microprocessor Operating Modes

8255 microprocessor was invented by intel in the year 1980s. 8255 microprocessor is a general-purpose microprocessor that can be programmed. 8255 is mostly used as an interface between devices like...

3 minutes read.

Ethernet Frame Format

What is Ethernet? As we know in computer networking, LAN (Local Area Network) is used to connect devices in limited geographical areas like schools or a building.LAN uses different topologies (arrangement...

3 minutes read.

Computer Organization and Architecture Tutorial

Introduction to Computer Organization and Architecture In this modern era, or we can say computer era, Technology from all around surrounds us. Human is conserved, connected and absorbed by Technology. From...

4 minutes read.

CarryLook Ahead Adder

What is Adder? Adder is the combinational circuit that is used to add the bits in digital electronics. As we know, in the digital system, every number is represented in the...

4 minutes read.

Microprocessor classification

Introduction: Microprocessor is known as the computer processor. The IC or integrated Circuit makes the microprocessor. that is the brain of the computer machine. The microprocessor is known as the...

6 minutes read.

74138 IC DECODER

74138 DECODER Decoder A combinational circuit called a decoder can have up to 2n output lines and 'n' input lines. When a decoder is enabled, depending on the mix of inputs,...

4 minutes read.

Local Broadcast Address and loopback address

In computer networking, if you send the data from one source to another source or group of sources in the form of packets, then this is called casting. We can categorize...

3 minutes read.

8085 Arithmetic Instructions

Arithmetic instructions are a type of instruction in a computer's instruction set that perform arithmetic operations on data. These operations can include addition, subtraction, multiplication, and division. Arithmetic instructions can...

4 minutes read.

Fixed and Floating-Point Number

Fixed and Floating-Point Number: In digital technology, data is stored in memory registers with binary bits 0’s and 1’s because the computer only understands binary language. When we enter data...

6 minutes read.

Bipartite Graph

A graph is said to be bipartite if and only if we can divide all the vertices of a graph into two sets such that these sets are mutually exclusive...

4 minutes read.

Flag Register of 8086 Microprocessor

In this article, we are going to study about the one of the registers named flag registers of 8086 microprocessor. We are also going to know where and how to...

3 minutes read.

Control Unit Organization

Control Unit Organization The Control Unit is the unit in the CPU, which controls the various components like input  & output devices, logic unit and memory. The Control Unit is the...

7 minutes read.