Search:

Type: Posts; User: breik

Search: Search took 0.00 seconds.

  1. Thread: modulo 2 modulus

    by breik
    Replies
    5
    Views
    3,657

    binary arithmatic

    Thanks for the thing about stdbool.h, I hadn't heard of it before. I think my problem is that I'm not understanding how to properly do modulo 2 division. The idea is that since we are concerned...
  2. Replies
    18
    Views
    1,862

    Yea I didn't mean to provide some production...

    Yea I didn't mean to provide some production code, just trying to demonstrate the concept. I'm running an i686 with the 2.6.15-gentoo-r1 linux kernel and compiled with gcc 3.4.5. Systems like mine...
  3. Thread: Emergency

    by breik
    Replies
    8
    Views
    1,262

    stdio.h

    Just look up what is availible to you in stdio.h.

    guidance.txt is a file in the same directory as the executable. This could definetly use come cleaning up to be functional, but I figure it gets...
  4. Replies
    18
    Views
    1,862

    Perhaps this code can help clear things up: ...

    Perhaps this code can help clear things up:


    #include <stdio.h>

    int main()
    {
    printf("size of int: %i\n", sizeof(int));
    printf("size of long: %i\n", sizeof(long));
    ...
  5. Replies
    18
    Views
    1,862

    I know for me, 'long' and 'int' are...

    I know for me, 'long' and 'int' are interchangable as a type-specifier, refering to a 4 byte unsigned data-type. However if I use long as a type-qualifier in front of int as a type-specifier, like...
  6. Thread: modulo 2 modulus

    by breik
    Replies
    5
    Views
    3,657

    I changed it to cpp so that I could use booleans...

    I changed it to cpp so that I could use booleans and wrote this:


    char *divide(char *message, char *divisor, char *remainder)
    {
    unsigned int result=*((unsigned int*)message);
    ...
  7. Thread: modulo 2 modulus

    by breik
    Replies
    5
    Views
    3,657

    modulo 2 modulus

    I'm having trouble writing a modulo 2 modulus function. I need to divide a 260 byte unsigned integer by a 4 byte unsigned integer without carrying bits (modulo 2) and return the remainder. ...
Results 1 to 7 of 7