mirror of
https://github.com/arthur-pbty/nsi.git
synced 2026-06-03 23:36:19 +02:00
8 lines
192 B
Python
8 lines
192 B
Python
es = int(input("Entrer un entier signé en complément à deux (-128 à +127) : "))
|
|
|
|
if es>=0:
|
|
rbn = es
|
|
else:
|
|
rbn = 256 + es
|
|
|
|
print("La représentation en binaire naturel est : ", rbn) |