Converting 1/3 to Floating Point (IEEE 754) Representation

Click For Summary
SUMMARY

The discussion focuses on converting the fraction 1/3 into its IEEE 754 floating-point representation. The user specifically inquires about the actual binary representation rather than the variable assignment in programming. The IEEE 754 format consists of a sign bit, an 8-bit exponent, and a 23-bit mantissa. The user ultimately resolves their query independently.

PREREQUISITES
  • Understanding of IEEE 754 floating-point format
  • Familiarity with binary number representation
  • Basic knowledge of floating-point arithmetic
  • Experience with programming languages that utilize floating-point types
NEXT STEPS
  • Research the IEEE 754 standard for single-precision and double-precision formats
  • Learn how to manually convert decimal fractions to binary
  • Explore tools for visualizing floating-point representations
  • Study the implications of floating-point precision in programming
USEFUL FOR

Computer scientists, software developers, and anyone interested in understanding floating-point arithmetic and its representation in programming languages.

khdani
Messages
53
Reaction score
0
Hello,
How do i convert 1/3 to floating point (IEEE 754) ?
 
Technology news on Phys.org
Code:
float n = 1.0 / 3;
 
i meant the actual representation of the number, not variable.
[Sign Bit] [8bit EXP] [23bit Mantissa]
but I've solved it , thanks anyway.
 

Similar threads

  • · Replies 32 ·
2
Replies
32
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
10K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 107 ·
4
Replies
107
Views
9K
Replies
42
Views
9K
  • · Replies 30 ·
2
Replies
30
Views
7K