Question:

On the Hammond machines, a single precision floating point (REAL*4) number uses how many bits of memory?

Show Hint

The number in types like ‘REAL*4‘ or ‘INTEGER*8‘ always specifies the size in bytes.
To find the size in bits, simply multiply that number by 8:
- ‘REAL*4‘ $\rightarrow 4 \times 8 = 32$ bits.
- ‘REAL*8‘ $\rightarrow 8 \times 8 = 64$ bits (double precision).
  • 4
  • 7
  • 32
  • 22
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept:
In computer architecture and programming languages, data types are allocated specific amounts of memory (measured in bytes or bits) to store values with a defined precision.
Key Formula or Approach:
The memory size of a data type can be converted between bytes and bits using the relation:
\[ \text{Size in bits} = \text{Size in bytes} \times 8 \]

Step 2: Detailed Explanation:

Let us determine the size of a single-precision floating-point number:
- In Fortran, a single-precision floating-point number is declared as ‘REAL‘ or explicitly as ‘REAL*4‘.
- The numeric suffix in ‘REAL*4‘ specifies that the variable is allocated 4 bytes of memory.
- Converting this size to bits:
\[ \text{Size in bits} = 4 \text{ bytes} \times 8 \text{ bits/byte} = 32 \text{ bits} \]
- This 32-bit representation typically follows the IEEE 754 standard for floating-point arithmetic, where:
- 1 bit is used for the sign.
- 8 bits are used for the exponent.
- 23 bits are used for the significand (fraction/mantissa).
Therefore, a ‘REAL*4‘ variable uses exactly 32 bits of memory.

Step 3: Final Answer:

A single precision floating point (REAL*4) number uses 32 bits of memory.
Was this answer helpful?
0
0