Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Binaerrechner
- color 0A
- :main
- set A=0
- set B=0
- set C=0
- set D=0
- set E=0
- set F=0
- set G=0
- set H=0
- set Zahl=0
- cls
- echo.
- echo Binaerrechner
- echo (Developed by **** *******)
- echo.
- echo Bitte geben sie eine Zahl ein,
- echo die sie in das Binaersystem
- echo umrechnen wollen.
- echo (Von 1-255)
- echo.
- set /p Zahl=
- :ZA
- if %Zahl% GEQ 128 goto AA
- :ZB
- if %Zahl% GEQ 64 goto AB
- :ZC
- if %Zahl% GEQ 32 goto AC
- :ZD
- if %Zahl% GEQ 16 goto AD
- :ZE
- if %Zahl% GEQ 8 goto AE
- :ZF
- if %Zahl% GEQ 4 goto AF
- :ZG
- if %Zahl% GEQ 2 goto AG
- :ZH
- if %Zahl%==1 goto AH
- goto main
- :Anzeige
- cls
- echo.
- echo Binaercode:
- echo %A%%B%%C%%D%%E%%F%%G%%H%
- pause >nul
- cls
- goto main
- :AA
- set /a Zahl=%Zahl%-128
- set A=1
- goto ZB
- :AB
- set /a Zahl=%Zahl%-64
- set B=1
- goto ZC
- :AC
- set /a Zahl=%Zahl%-32
- set C=1
- goto ZD
- :AD
- set /a Zahl=%Zahl%-16
- set D=1
- goto ZE
- :AE
- set /a Zahl=%Zahl%-8
- set E=1
- goto ZF
- :AF
- set /a Zahl=%Zahl%-4
- set F=1
- goto ZG
- :AG
- set /a Zahl=%Zahl%-2
- set G=1
- goto ZH
- :AH
- set /a Zahl=%Zahl%-1
- set H=1
- goto Anzeige
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement