Question
Asked Jan 29, 2020
6 views

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

Sign Exponent
Mantissa
Derive 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 are
the floating-point representations for the first eight, odd, positive, decimal
integers (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 bit
from 0 to 1.
help_outline

Image Transcriptionclose

Sign Exponent Mantissa Derive 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 are the floating-point representations for the first eight, odd, positive, decimal integers (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 bit from 0 to 1.

fullscreen
check_circle

Expert Answer

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 × 2y (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 = (2a / 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 × 20

So, exponent is 0.

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

Bias = (24/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-

Computer Science homework question answer, step 2, image 1
fullscreen
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...

Computer Science homework question answer, step 3, image 1
fullscreen

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

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...

question_answer

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...

question_answer

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; ...

question_answer

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...

question_answer

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...

question_answer

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 ...

question_answer

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...

question_answer

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...

question_answer

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...