Hello!
Does anybody know what is binary representation of integer datatype
fields written to archlogs on z/OS (OS/390) machines? Is it "Two's
complement", "One's complement", Sign-modulo or whatever?
I would analyze it for myself if someone would provide me with some
binary (hex) representations of some numbers as: 0, 1, -1 and couple
more of your choice.
I will be very thankful for any hints.
Maciek 3 4158
shyha wrote:
Hello!
Does anybody know what is binary representation of integer datatype
fields written to archlogs on z/OS (OS/390) machines? Is it "Two's
complement", "One's complement", Sign-modulo or whatever?
I would analyze it for myself if someone would provide me with some
binary (hex) representations of some numbers as: 0, 1, -1 and couple
more of your choice.
I will be very thankful for any hints.
SELECT HEX(INTEGER(-1)) FROM SYSIBM.SYSDUMMY 1
Should tell (I assume HEX() exists on DB2 for zOS)
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
IOD Conference http://www.ibm.com/software/data/ond...ness/conf2006/
shyha wrote:
Hello!
Does anybody know what is binary representation of integer datatype
fields written to archlogs on z/OS (OS/390) machines? Is it "Two's
complement", "One's complement", Sign-modulo or whatever?
I would analyze it for myself if someone would provide me with some
binary (hex) representations of some numbers as: 0, 1, -1 and couple
more of your choice.
I will be very thankful for any hints.
Maciek
While Serge's reply lets you investigate for yourself, the direct answer
for both integer and smallint is big-endian two's complement. This is
different from Windows machines which are little-endinan and also AIX (I
think, it has been several years) which is also little-endian. Don't
even think about decoding floating point representation.
Serge Rielau napisal(a):
shyha wrote:
>Hello!
Does anybody know what is binary representation of integer datatype fields written to archlogs on z/OS (OS/390) machines? Is it "Two's complement", "One's complement", Sign-modulo or whatever?
I would analyze it for myself if someone would provide me with some binary (hex) representations of some numbers as: 0, 1, -1 and couple more of your choice.
I will be very thankful for any hints.
SELECT HEX(INTEGER(-1)) FROM SYSIBM.SYSDUMMY 1
Should tell (I assume HEX() exists on DB2 for zOS)
Cheers
Serge
Hi! I checked this query but hex values are different than this visible
in archlog (we did some more research and found suitable data in
archlog). HEX function seems to give results in "two's complement"
system. We found out that (in archlog) binary representation seems to be
something like
value in archlog = value+2^(length-1)
for example: if we have 16bit integer of value -319
than we expect to see 7EC1 in archlog:
-319 + 2^(16-1) = -319 + 2^15 = -319 + 32768 = 32449 = 7EC1 hex
it seems like it's just moving 0 value across axis...
could anyone confirm that?
Cheers
Maciek This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark Dufour |
last post by:
Hi all,
I need to convert an integer into some binary representation. I found the
following code in the online cookbook (adapted to return a list):
binary = lambda n: n>0 and +binary(n>>1) or
This is sure nice, but I'm wondering why something like this doesn't seem to
be in the standard library, for example by formatting with '%b' % number. I
can't think of a any reason for not doing it this way, as working with binary
|
by: Andrew |
last post by:
Hi I have a question is there a function in C++ to convert an integer into a
Binary number
Thanks in Advance
Cheers
|
by: Madhusudan Singh |
last post by:
Hi
I am using binascii.b2a_hex to convert some binary data to hex. The result
is a two bit hex representation (i. e., without the leading hex). How do I
convert the resulting two bit representation into an integer ?
Thanks.
|
by: Mantorok Redgormor |
last post by:
are all integers represented internally as just bit vectors?
-- nethlek
|
by: GS |
last post by:
The stdint.h header definition mentions five integer categories,
1) exact width, eg., int32_t
2) at least as wide as, eg., int_least32_t
3) as fast as possible but at least as wide as, eg., int_fast32_t
4) integer capable of holding a pointer, intptr_t
5) widest integer in the implementation, intmax_t
Is there a valid motivation for having both int_least and int_fast?
| |
by: Vish |
last post by:
Hi All
I have written a program to count the maximum contiguous set bits in an
integer .
Like if my binary representation of integer is :
1100111 : then output should be 3.
111000111110000101010111111 : then output should be 6.
I am including the snippet below.
How can I optimize this code and also is there a one liner to
|
by: junky_fellow |
last post by:
Can anybody please explain this:
When a value with integer type is converted to another integer type
other than _Bool,
if the new type is unsigned, the value is converted by repeatedly
adding or subtracting one more than the maximum value that can be
represented in the new type until the value is in the range of the new
type.
|
by: Dave |
last post by:
Hi all,
I have a 4 byte char array with the binary data for two 16-bit signed
integers in it like this:
Index 3 2 1 0
Data Bh Bl Ah Al
Where Bh is the high byte of signed 16-bit integer B and so on.
|
by: fdu.xiaojf |
last post by:
Hi,
String formatting can be used to converting an integer to its octal or
hexadecimal form:
'307'
'c7'
But, can string formatting be used to convert an integer to its binary
form ?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |