View previous topic :: View next topic
|
Author |
Message |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Sometimes some people just do not see the difference betwee "A and "B", all they see is that "they're letters, so what"..... |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Quote: |
COBOL Computational Fields:
This is a discussion of COBOL Computational fields. Several numeric data types are discussed, including the common "packed" and "comp-3" fields.
By default, numeric values in COBOL files are stored in display, or character, format. That is, the value is stored as a base-ten number, with each digit represented by the corresponding EBCDIC (or ASCII) character. For example, the value 1234 is stored in four bytes which contain "1", "2", "3", and "4" (F1, F2, F3, F4 Hex).
But because computers perform computations with binary numbers, it is more efficient to store values in their native binary form than to store them in human readable base ten. If the number is stored in its native binary format it can be input from the file and used directly. If it's stored in a base ten format it needs to be converted to binary before performing calculations on it, then converted back to base ten for storage. Binary is faster -- typically about 8 times -- and usually requires less storage space.
|
this is from http://www.discinterchange.com/TechTalk_COBOL_comp_.html
see the line because computers perform computations with binary numbers, it is more efficient to store values in their native binary form than to store them in human readable base ten
as far as i know This is what main aim of COMP and
Quote: |
When it adds 2 + 2, it adds X'2C' to X'2C' and the result is X'4C' |
as a student from electronics i am not understand that because GATES and BUFFERS are the main building blocks of computer as far as i know electrical pulses does the arithmatic .I dont know how computer will know what is that X2C that is a higher version
william you are seeing things only from ouside i think you had to read more to get inside |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Bill,
Once again, he is posting information that is not mainframe-based.
If we could only get him to realize that windows/unix are very different than the IBM mainframe.
Probably won't happen. For some, what they learn first, overrides any additional learning.
Maybe with time he'll learn that while a lot of the syntax is the same, much of the underlying infrastructure is not between the platforms. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
We can alway hope....
Never the less, 'nuff said.... |
|
Back to top |
|
|
|