Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

ohhhh whaaat, I absolutely had my answer on preview for this one and then I knocked my pc off luls...

in essence, I was looking at the integers -8 .. 7 were constructed from the 4 bits rather than how the operation of additon occured upon them.

However, the outcome is that integers as we see them are of two subsets.

The signed integers are composed of a full mask split into a significant bit mask and the complement, the integer being derived from the difference of the component mask to the highbit mask.

The unsigned integers are composed of a full mask split into two, a full mask and its complement (a no-mask), the integer being derived from the differnce of the full mask to the complement mask.

Then there are the unused integers, of the type displayed in the example above Re^6: Can I access and use UV types from perl?. That is where the masks are of a size such that the mask and its complement fills the size of the data providing the integer, and not being 1 or 0 on either side. For example, equal sizes.

An example of the masking to produce integers.

complement mask - sigbitmask + complement mask - sigbitmask 0111 - 1000 + 0111 - 1000 c) 1110 + 0101 0110 - 1000 + 0101 - 0000 (6) - (8) + (5) - (0) (-2) + (5) = 3

Example c number used, taken from Re^7: Can I access and use UV types from perl?, but this works with the others too.

So integers are what we think they are, the difference of pairs of natural numbers.

edit added link to reply containing number used in this example, courtesy haukex

In reply to Re^8: Can I access and use UV types from perl? by Don Coyote
in thread Can I access and use UV types from perl? by Don Coyote

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-16 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found