Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,12 +1,12 @@
|
|||
Module Complement2{
|
||||
// we use binary.and to get a number in range of byte 0 to 255
|
||||
byte k, v
|
||||
v=random(1, 255) ' there is no two's complement for zero
|
||||
z=binary.and(binary.not(v)+1, 0xFF)
|
||||
print v
|
||||
print z
|
||||
print z=255-v+1 // z is type of byte always positive
|
||||
print sint(z+0xFFFFFF00)=-v // using 4bytes, we add unsinged 0xFFFFFF00
|
||||
// we use binary.and to get a number in range of byte 0 to 255
|
||||
byte k, v
|
||||
v=random(1, 255) ' there is no two's complement for zero
|
||||
z=binary.and(binary.not(v)+1, 0xFF)
|
||||
print v
|
||||
print z
|
||||
print z=255-v+1 // z is type of byte always positive
|
||||
print sint(z+0xFFFFFF00)=-v // using 4bytes, we add unsinged 0xFFFFFF00
|
||||
}
|
||||
Complement2
|
||||
Complement2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue