Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
9
Task/Twos-complement/Racket/twos-complement.rkt
Normal file
9
Task/Twos-complement/Racket/twos-complement.rkt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#lang racket/base
|
||||
|
||||
(define (main)
|
||||
(let ([n 42])
|
||||
(printf "n = ~a, -n = ~a, two's complement = ~a\n"
|
||||
n (- n) (add1 (bitwise-not n)))))
|
||||
|
||||
(module+ main
|
||||
(main))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
mov rax, 1968 ; 1968 in rax
|
||||
neg rax ; -1968 should be in rax
|
||||
;------------------
|
||||
not rax
|
||||
inc rax ; 1968 should be in rax again.
|
||||
Loading…
Add table
Add a link
Reference in a new issue