[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Right shifting in octave
From: |
goblinsly |
Subject: |
Right shifting in octave |
Date: |
Thu, 1 May 2014 18:35:23 -0700 (PDT) |
Hey everyone,
I am writting a simple crc32 program in octave, i have a working program
written in c as a guideline/help. Right now i am stuck with the
rightshifting:
in c:
unsigned int crc = -85
unsigned int number = (crc >> 1);
The result is a really big number 2147483605. Basicly i get the same result
as if i put 0xFFFFFFFF instead of -85. And the program works.
In Octave i get a really small number -43:
crc = -85
a = bitshift(crc, -1)
How can i duplicate the big result from c in octave ?
--
View this message in context:
http://octave.1599824.n4.nabble.com/Right-shifting-in-octave-tp4663871.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Right shifting in octave,
goblinsly <=