Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly 370 > HLASM Floating ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 304 of 328
Post > Topic >>

HLASM Floating Point Field - Remainder?

by Hansedl <david.l.hansen@[EMAIL PROTECTED] > Jun 19, 2007 at 01:33 PM

Hi group,

   I am looking at a record layout that has a floating point field.
The field is four bytes, it is for short data operations known as
format "E" and
uses 32 bits of data from the registers.  The field contains
x'43E88000'.  This means the x'43' denotes the sign bit and the
characteristic or
exponent.  The x'E88000' is the mantissa or fraction (binary '1110
1000 1000'). The exponent is  binary '100 0011' (67 decimal).  In
order to sup****t
negative characteristics, the assembler increases the exponent by 64
before converting it to binary.  The bias is 64 so 67 - 64 = 3 (the
exponent).
So the value is '111.010001000' because we move the radix point three
places to the right.  This field contains the Elapsed time, in seconds
which is
binary '111.010001000' which looks like about decimal number 7.  This
is where may calculator doesn't keep up with precision.  Binary
'11101000' is
decimal 232, but I don't think you can move the radix point around by
two.  So binary '111.010001000' is 7 + a bit more.  The binary '.
01000100'
enters as binary '1000100' and is decimal 68.  But the leading zero
means something on '.010001000'.  I could say the number is greater
than 7, but
floating point is known for accuracy and I would be loosing a bit of
accuracy.
  Q). How do I figure out my "remainder" (.010001000)?

  Another number I have is x'423c0000'.  So x'42' is binary '1000010'
or decimal 66.  And 66 - 64 = 2.  So x'3C' is binary  '111100'
adjusted two to
the right is  binary '11.11' or about 3 with a remainder of
something?  This field is the length of the sample period.  The same
header is used for
different record layouts.  I see this same field in a different record
displayed as x'43528000'.  So my exponent is 3 and my fraction is x
'528000',
or perhaps binary '1010010 10000000 0000 0000'.  So Binary '10100101'
is decimal 165, but I never get anywhere converting this number.  So
binary
'101.0011' is just greater than 5.

  Any tips on this would be appreciated.

   Thank you,  Dave H.
 




 7 Posts in Topic:
HLASM Floating Point Field - Remainder?
Hansedl <david.l.hanse  2007-06-19 13:33:28 
Re: HLASM Floating Point Field - Remainder?
glen herrmannsfeldt <g  2007-06-19 15:30:02 
Re: HLASM Floating Point Field - Remainder?
Hansedl <david.l.hanse  2007-06-27 08:27:03 
Re: HLASM Floating Point Field - Remainder?
Barry Schwarz <schwarz  2007-06-27 18:33:54 
Re: HLASM Floating Point Field - Remainder?
poitras@[EMAIL PROTECTED]  2007-06-28 01:55:05 
Re: HLASM Floating Point Field - Remainder?
Binyamin Dissen <posti  2007-06-28 10:04:30 
Re: HLASM Floating Point Field - Remainder?
Michel Hack <hack@[EMA  2007-06-28 15:17:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:16:48 CDT 2008.