CC4057 - Data Representation, Binary Conversion, and Reflection
VerifiedAdded on  2023/05/30
|7
|815
|283
Homework Assignment
AI Summary
This assignment focuses on data representation through binary conversion techniques, specifically addressing the conversion of decimal numbers, including floating-point values, into their binary equivalents and Binary32 formats. It details the step-by-step procedures for converting both integer and decimal values, including sign bit representation, mantissa calculation, and exponent determination. The assignment also includes a reflection on the learning experience, highlighting the understanding gained regarding the implementation of decimal-to-binary conversion techniques and the practical application of these concepts in computer systems. This document is available on Desklib, a platform offering a range of study tools and solved assignments for students.

0
Running head: DATA REPRESENTATION
Data Representation
Name of student:
Name of the University:
Author note:
Running head: DATA REPRESENTATION
Data Representation
Name of student:
Name of the University:
Author note:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1
DATA REPRESENTATION
Table of Contents
Requirement 1............................................................................................................................2
Requirement 2............................................................................................................................2
Requirement 3............................................................................................................................3
Requirement 4............................................................................................................................5
Requirement 5............................................................................................................................6
DATA REPRESENTATION
Table of Contents
Requirement 1............................................................................................................................2
Requirement 2............................................................................................................................2
Requirement 3............................................................................................................................3
Requirement 4............................................................................................................................5
Requirement 5............................................................................................................................6

2
DATA REPRESENTATION
Let the Cost of a CD be 13.875 pounds
Requirement 1
Rounded-off cost of CD is 14 pounds
Therefore, cost in binary would be 1110
Conversion Process:
(14)10 = (1110)2
Requirement 2
Step 1 Divide the decimal value 14 by 2
(new base for binary)
Step 2 Keep recording the remainders of the division, side by side.
Step 3 Further divide the quotient from the above division by 2 again.
Step 4 Repeat the process of remainder recording.
Step 5 Continue iterating through steps 3 and 4 unless the quotient is 0.
Step 6 On getting a 0 as quotient, note down the remainders from down to the top in a
left-to-right natural format.
Step 7 This will produce the binary value of any decimal number.
Requirement 3
Now converting floating point decimal 13.875 to binary.
13 in Binary is 1101
Divisor
(Base)
Decimal Remainder
2 14 0
2 7 1
2 3 1
2 1 1
0
DATA REPRESENTATION
Let the Cost of a CD be 13.875 pounds
Requirement 1
Rounded-off cost of CD is 14 pounds
Therefore, cost in binary would be 1110
Conversion Process:
(14)10 = (1110)2
Requirement 2
Step 1 Divide the decimal value 14 by 2
(new base for binary)
Step 2 Keep recording the remainders of the division, side by side.
Step 3 Further divide the quotient from the above division by 2 again.
Step 4 Repeat the process of remainder recording.
Step 5 Continue iterating through steps 3 and 4 unless the quotient is 0.
Step 6 On getting a 0 as quotient, note down the remainders from down to the top in a
left-to-right natural format.
Step 7 This will produce the binary value of any decimal number.
Requirement 3
Now converting floating point decimal 13.875 to binary.
13 in Binary is 1101
Divisor
(Base)
Decimal Remainder
2 14 0
2 7 1
2 3 1
2 1 1
0
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3
DATA REPRESENTATION
Conversion process:
Divisor
(Base)
Decimal Remainder
2 13 1
2 6 0
2 3 1
2 1 1
0
(13)10 = (1101)2
Sign bit representation: 0 1101
Now converting the fractional part 0.875 to binary:
0.875 x 2 = 1.75
0.75 x 2 = 1.50
0.50 x 2 = 1.0
Therefore, (13.875)10 = (1101.111)2
Sign bit representation: 0 1101.111
Converting to binary32:
0 1.101111 x 23
101111 is 6 bit number
Therefore, adding 23-6=17 zeroes to the mantissa,
DATA REPRESENTATION
Conversion process:
Divisor
(Base)
Decimal Remainder
2 13 1
2 6 0
2 3 1
2 1 1
0
(13)10 = (1101)2
Sign bit representation: 0 1101
Now converting the fractional part 0.875 to binary:
0.875 x 2 = 1.75
0.75 x 2 = 1.50
0.50 x 2 = 1.0
Therefore, (13.875)10 = (1101.111)2
Sign bit representation: 0 1101.111
Converting to binary32:
0 1.101111 x 23
101111 is 6 bit number
Therefore, adding 23-6=17 zeroes to the mantissa,
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4
DATA REPRESENTATION
Mantissa is 10111100000000000000000
For the exponent, 127 + 3 = 130 in binary is 10000010
Conversion process:
Decimal Binary
2 130 0
2 65 1
2 32 0
2 16 0
2 8 0
2 4 0
2 2 0
2 1 1
2 0
Sign 1 bit Exponent 8 bit Mantissa 23 bits
0 10000010 10111100000000000000000
Therefore Answer in binary32 = 01000001010111100000000000000000
Requirement 4
Step 1 Firstly, the whole number part of the value is extracted out and its binary
equivalent is sorted out according to the steps described in Requirement 2.
Step 2 The sign bit is added to the left of the binary representation. (0 for positive and
1 for negative).
DATA REPRESENTATION
Mantissa is 10111100000000000000000
For the exponent, 127 + 3 = 130 in binary is 10000010
Conversion process:
Decimal Binary
2 130 0
2 65 1
2 32 0
2 16 0
2 8 0
2 4 0
2 2 0
2 1 1
2 0
Sign 1 bit Exponent 8 bit Mantissa 23 bits
0 10000010 10111100000000000000000
Therefore Answer in binary32 = 01000001010111100000000000000000
Requirement 4
Step 1 Firstly, the whole number part of the value is extracted out and its binary
equivalent is sorted out according to the steps described in Requirement 2.
Step 2 The sign bit is added to the left of the binary representation. (0 for positive and
1 for negative).

5
DATA REPRESENTATION
Step 3 The fractional part of the value is then extracted.
Step 4 Multiply the fractional extract with 2 and note down the result.
Step 5 If the product is 1.0 then stop right away, else ignore the whole number part
and extract the fractional part from the product.
Step 6 Carry on with the steps 4 and 5 unless 1.0 is reached.
Step 7 On stopping, extract all the whole numbers from the products in top-to-down
manner and write them down in left-to-right fashion. This would be the mantissa.
Step 8 Add a decimal point before them and add it to the whole number’s binary
representation.
Step 9 Now move the decimal point to the right except for leaving only two values
including the sign bit. Note down the number of movements required and add it to
127 to get the value of the exponent in decimal.
Step 10 Add leading zeros to make the mantissa part of length 23 bits.
Step 11 Now covert the exponent value from decimal to binary and place the answer
before the mantissa.
Step 12 Also add the sign bit in the beginning, to complete the Binary32
representation.
DATA REPRESENTATION
Step 3 The fractional part of the value is then extracted.
Step 4 Multiply the fractional extract with 2 and note down the result.
Step 5 If the product is 1.0 then stop right away, else ignore the whole number part
and extract the fractional part from the product.
Step 6 Carry on with the steps 4 and 5 unless 1.0 is reached.
Step 7 On stopping, extract all the whole numbers from the products in top-to-down
manner and write them down in left-to-right fashion. This would be the mantissa.
Step 8 Add a decimal point before them and add it to the whole number’s binary
representation.
Step 9 Now move the decimal point to the right except for leaving only two values
including the sign bit. Note down the number of movements required and add it to
127 to get the value of the exponent in decimal.
Step 10 Add leading zeros to make the mantissa part of length 23 bits.
Step 11 Now covert the exponent value from decimal to binary and place the answer
before the mantissa.
Step 12 Also add the sign bit in the beginning, to complete the Binary32
representation.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6
DATA REPRESENTATION
Requirement 5
This assignment taught me a lot about the implementation of the decimal to binary
conversion techniques. I learnt the process of simple decimal to binary conversions and also
how, floating point decimal values are converted into their respective binary equivalents.
I first went through the basics of the computer number system and then climbed up to
learn the details of the conversion processes. In order to learn to convert decimal floating
point numbers to binary32 formats, I taught myself to convert these to general binary
numbers first. Then went through the steps to learn the Binary32 conversion process, with the
details about the sign bits, exponents and the mantissa. It was a great experience to learn how
the computer actually works with the data that we feed into it.
DATA REPRESENTATION
Requirement 5
This assignment taught me a lot about the implementation of the decimal to binary
conversion techniques. I learnt the process of simple decimal to binary conversions and also
how, floating point decimal values are converted into their respective binary equivalents.
I first went through the basics of the computer number system and then climbed up to
learn the details of the conversion processes. In order to learn to convert decimal floating
point numbers to binary32 formats, I taught myself to convert these to general binary
numbers first. Then went through the steps to learn the Binary32 conversion process, with the
details about the sign bits, exponents and the mantissa. It was a great experience to learn how
the computer actually works with the data that we feed into it.
1 out of 7
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
 +13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.