1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

(UNO)8ビット機、-1のマイナスを外す。あと-6も

Last updated at Posted at 2024-08-26

参考

x UNOでは、そのうちやる

●マイナスは、-1して、全反転すると外す事が出来る。

aは、一時領域

a = (-1) - 1

a = ~a

ex -6

b = -6

b--

b = ~b

結果

o_coq345.jpg

プログラム

オンラインコンパイラ


#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    printf("START\n");
    
    int a,b;
    
    a = (-1)-1;
    a = ~a;
    
    printf("%d\n",a);
    
    b = -6;
    b--;
    b =~ b;
    
    printf("%d\n",b);
}



1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?