# Binary

## Countingsystem

### Base

Thecountingsystematthebaseb(wherebisApositivenaturalnumberiscalledabase),andbbasicsymbols(ornumbers)correspondtothesmallestbnaturalnumbersincluding0.Togenerateothernumbers,thepositionofthesymbolinthenumbermustbeused.Thesymbolofthelastdigitusesitsownvalue,andthevalueofonedigittotheleftismultipliedbyb.Generallyspeaking,ifbisthebase,weexpressthenumberinthebbasesystemintheformof,andwritethenumbersinordera0a1a2a3...ak.Thesenumbersarenaturalnumbersfrom0tob-1.

Number

Andaretheproportionsofthecorrespondingnumbers.

### Binarycounting

TheGermanmathematicianLeibnizfromthe17thtothe18thcenturywasthefirstpersonintheworldtoproposethebinarynotation.Usebinarynotation,onlyusethetwosymbolsof0and1,noothersymbolsareneeded.

Binarydatacangenerallybewrittenas：

[Example]:Writethebinarydata111.01intheformofweightingcoefficient.

Solution:

## Operation

### Multiplication

Therearefourcasesofbinarymultiplication:0×0=0,1×0=0,0×1=0,1×1=1.

### Subtraction

Therearefourcasesofbinarysubtraction:0-0=0,1-0=1,1-1=0,0-1=1.

### Division

Therearetwocasesofbinarydivision(thedivisorcanonlybe1):0÷1=0,1÷1=1.

### Example

Thearithmeticoperationoftwobinarynumbers1001and0101canbeexpressedas:

## Binaryconversion

### Binaryconversiontodecimal

[Example]:

Rule:Thenumberofdigitsintheonesplaceis0,thenumberoftens'digitsis1,......,increasingsequentially,andthenumberofdigitsinthetenthplaceis-1,andthenumberofdigitsinthepercentileis-2,...,indescendingorder.

### Convertingdecimaltobinary

Anotherexample,10110111from2to5:

## Thereasonwhythecomputerusesbinary

Firstofall,thebinarysystemusesonlytwodigits.0and1,soanyelementwithtwodifferentstablestatescanbeusedtorepresentacertaindigitofanumber.Infact,therearemanycomponentswithtwoobviousstablestates.Forexample,the"on"and"off"oftheneonlamp;the"on"and"off"oftheswitch;the"high"and"low","positive"and"negative"ofthevoltage;the"holes"and"Nohole";"signal"and"nosignal"inthecircuit;thesouthandnorthpolesofmagneticmaterials,etc.,tonameafew.Itiseasytousethesedistinctstatestorepresentnumbers.Notonlythat,butmoreimportantly,thetwocompletelydifferentstatesarenotonlyquantitativelydifferent,butalsoqualitativelydifferent.Inthisway,theanti-interferenceabilityofthemachinecanbegreatlyimproved,andthereliabilitycanbeimproved.Itismuchmoredifficulttofindasimpleandreliabledevicethatcanexpressmorethantwostates.