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...
Type: Posts; User: breik
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...
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...
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...
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));
...
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...
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);
...
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. ...