Engineering

Computer ScienceQ&A LibrarySign ExponentMantissaDerive its decimal value?2) The range of integers that can be represented by this 12-bit construction is-255 to 255 (a 9-bit signed integer has a range of -256 to 255). What arethe floating-point representations for the first eight, odd, positive, decimalintegers (i.e., 1, 3, 5, 7, 9, 11, 13, 15) in this 12-bit notation?Note: to get their negative counterparts, one only has to toggle the sign bitfrom 0 to 1.Question

Asked Jan 29, 2020

6 views

What is the process of writing these odd numbers in this 12-bit floating point representation

Step 1

**Approach-**

If the number is positive, then the sign bit is 0, otherwise sign bit is 1.

Convert the number to binary form.

For obtaining the value of mantissa-

1.nnnn × 2^{y} (in scientific notation)

Here, nnnn is the mantissa and y is the exponent. Mantissa is obtained by taking the bits except the first 1 in binary representation.

Since mantissa is represented in 7-bits, and mantissa is of 3 bits. So, fill the rest of bits by filing zero in it.

Calculate the exponent-

In floating point representation, the exponent obtained is added with a bias-

Bias = (2^{a} / 2) – 1

a =no of bits in exponent

Now add bias value to the exponent value and represent that number in binary form.

Step 2

**Solution-**

1) **1**

As, the number is positive so sign bit will be 0.

Binary representation of 1 = 0001

In scientific form it will be represented as **1 × 2 ^{0}**

So, exponent is 0.

Since we have no bits after 1 so the mantissa part will be **0000000**

Bias = (2^{4}/2)-1 = 7

Now add 7 as bias value to exponent value, we will get 7 as answer.

Now represent 7 in binary form, which will be **0111.**

So, the exponent bits will be 0111.

Hence, the final representation is shown below-

Step 3

2) **3**

As, the number is positive so sign bit will be 0.

Binary representation of 3 = 0011

In scientific form it will be represented as **1.1 × 21**

So, exponent is 1.

Since we must take bits after first 1 so the mantissa part will be **1000000**

Bias = (24/2)-1 = 7

Now add 7 as bias value to expo...

Tagged in

Find answers to questions asked by student like you

Show more Q&A

Q: What is a sign bit used for and where is it located?

A: Variables can be represented in two ways, one is signed and other is unsigned, such as integer. Sign...

Q: What is the difference between hexanumber and ascii code

A: Warm-up description –ASCII code –ASCII stands for American Standard Code for Information Interchange...

Q: Design an Essay class that is derived from the GradedActivity class:class GradedActivity{private:dou...

A: Program:#include <iostream> using namespace std; class GradedActivity{ private: double score; ...

Q: Write a program that reads a list of words. Then, the program outputs those words and their frequenc...

A: In main all the variable and vector declared.push_back() function is used to insert the words in vec...

Q: The U.S. Census Bureau projects population based on the following assumptions:- One birth every 7 se...

A: Program –// declaring the classpublic class Population{ // defining the main method public sta...

Q: What is the Oracle database SQL statement needed to show system privileges associated with my role? ...

A: This question is based on the Data Base SQL (Structured Query Language):Data Base: A data base is a ...

Q: Provide the code to create an input box for a data field named custPassword, with an input type suit...

A: Create a file with .html extension.Inside <body> tag, create a <form> tag.Inside <for...

Q: Problem: Create a base class called Vehicle that has the manufacturer’s name (type String), number o...

A: The java program and approach are given below:Approach: Defining the class “Vehicle” with required m...

Q: Using OOP language Java Given a currency with denominations of 100, 50, 20, 10, 5 and 1 write a meth...

A: Program DescriptionWe define a class called MakeChange which has a private static method called make...