Subject: язык С битовый оператор progr. main(){ unsigned int u; printf("Input a number: "); scanf("%d",&u); printf("2\'s complement is: %x\n",~u+1); Result> Input a number: 256 2's complement is: ff00 2's complement - это двойное отрицание или нет что-то другое? |
https://ru.wikipedia.org/wiki/Дополнительный_код_(представление_числа) |
спасибо! |
You need to be logged in to post in the forum |