IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Comp-3 to hold negative Zero


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri May 09, 2008 6:13 pm
Reply with quote

FWIW, I noticed this a couple weeks back while researching in the PoOp for another topic question....
Under some circumstances, a zero with a minus sign (negative zero) is produced. For example, the multiplicand:
00 12 3D (-123)
times the multiplier:
0C (+0)
generates the product:
00 00 0D (-0)
because the product sign follows the algebraic rule of signs even when the value is zero. A negative zero, however, is equivalent to a positive zero in that they compare equal in a decimal comparison.
Back to top
View user's profile Send private message
birdy K

New User


Joined: 05 Mar 2008
Posts: 72
Location: chennai

PostPosted: Mon May 12, 2008 10:18 am
Reply with quote

Hai everybody

Sorry for the Delay. I was out of my station. Thank You CICS Guy. I asked How to include - sign with zero. Anyway It is meaningless. But Onsite asked me to do that. Now they dont need that. But I am interested to know. So I asked your suggestion. When I asked your suggestion. I didnt see CICS Guy post. Thank you for all.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top