Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
16
Task/Twos-complement/Yabasic/twos-complement.basic
Normal file
16
Task/Twos-complement/Yabasic/twos-complement.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
d = 1234567
|
||||
|
||||
dim b(8)
|
||||
b(0) = -d
|
||||
b(1) = -d+1
|
||||
b(2) = -2
|
||||
b(3) = -1
|
||||
b(4) = 0
|
||||
b(5) = 1
|
||||
b(6) = 2
|
||||
b(7) = d-2
|
||||
b(8) = d-1
|
||||
|
||||
for i = 0 to arraysize(b(), 1)
|
||||
print b(i), " -> ", -b(i)
|
||||
next i
|
||||
Loading…
Add table
Add a link
Reference in a new issue