Documentos de Académico
Documentos de Profesional
Documentos de Cultura
2 a otnemelpmoc :odasu etnemetneucerf sm otamrof le ne sacitmtira senoicarepo ed nicazilaer ed osecorp le rallateD sovitagen soremn ed nicatneserper al arap sodasu soinevnoc sotnitsid sol ricudortnI soiranib soremn ed nisivid y nicacilpitlum ,atser ,amus ed senoicarepo sal ribircseD
senoicarepo satse ed socisb soipicnirp sol reconoc oirasecen se socitmtira sotiucric sol rednerpmoc araP selatigid sametsis ed sopit sorto sohcum ne y serodanedro sol ne laicnese se airanib acitmtira aL
Introduccin
Aritmtica binaria
3. Aritmtica binaria
0 + 0 = 00
1 + 1 = 10 1 + 0 = 01 0 + 1 = 01
Suma binaria
Aritmtica binaria
sod ed ragul ne stib sert ramus a sodagilbo somev son 1 a laugi oerraca nu ecerapa euq le ne otnemom le nE
1 + 0 + 0 = 01 suma 1, acarreo 0 suma 0, acarreo 1 suma 0, acarreo 1 suma 1, acarreo 1 1 + 0 + 1 = 10 1 + 1 + 0 = 10 1 + 1 + 1 = 11
1 1 1
1 0 0
1 1 0
0 0 0
14 + 10 24
5
Suma binaria
1 0 0 1 0 0 1 0 1 0 1 1
)1 sonem 0( odneartsus le euq ronem se odneunim le iS sanmuloc ne azinagro es nibmat atser ed nicarepo aL
Resta binaria
ovitagen oerraca oveun nu ed nicareneg al acilpmi odneartsus le ne 1 nu a ovitagen oerraca nu ramuS anmuloc etneiugis al ed odneartsus la 1 somamus ,riced se ,ovitagen oerraca nu ecudorp eS sod sol ertne aicnerefid al se atser al ed odatluser lE
1 0 0 1 1 1 0 1 0 0 0 1
0 0 0 0 1 1 1 0 1 0 0 1
1 0 1 0 1 0 1 1 1 0 1 0
13
8 7
01 x 11 :olpmejE
sodot solodnmus ogeul y adreiuqzi al a nicisop anu laicrap otcudorp oveun adac odnazalpsed ,selaicrap sotcudorp odnareneg azilaer es nicacilpitlum aL :nos airanib nicacilpitlum al ed sacisb salger saL
Multiplicacin binaria
0x1=0 0x0=0 1x1=1 1x0=0
Multiplicacin binaria
1 0 0 0 0 0 1 0 + 1 1 0 1 0
1
0 0 0 0 0
1 1 0 1 0
1 1 0 1 0
1 0 1
1 x 1 0 + 1 1
26 x 5 = 130
0 1 0 0 3 x 2 6
9
10
Divisin binaria
Aritmtica binaria
Aritmtica binaria
sodarbmutsoca somatse euq la atser y nicacilpitlum ed lanoicidart otneimidecorp le eugis airanib nisivid aL 011 / 110001 :olpmeje ortO 11 / 011 :olpmejE
1 1 1 1 0 0 0
11
1 1
1 0
6 0
3 2
0 0 0
Divisin binaria
1 0 0 0 1 1
1
1 1 0
1
1 1 0 1 0 1
0 0 1 0 1 1 1 1 0 0 1 0 1 35 / 6 = 5 (resto = 5)
12
ajif nicisop anu eneit ongis ed tib le euq ol rop ,stib ed daditnac omsim al neneit rodanedro nu ne soremn sol sodoT ongis le atneserper ovitacifingis sm tib le ,solle sodot nE ovitagen o ovitisop se is acidni ongis lE oremn led rolav le acidni dutingam aL
ongis us y dutingam us rop aziretcarac es ongis noc oiranib oremn nU sovitagen soremn omoc sovitisop soremn otnat rajenam ed secapac res nebed selatigid sametsis soL
Nmeros con signo
14 13
)1 1n2(+ atsah )1 1n2( edsed nav euq serolav renet nedeup dutingam-ongis ne soremn soL
dutingam al ratneserper a stib )1 n( racided ols stib n ed oremn nu ,ongis ed tib nu nasu dutingam-ongis otamrof ne soremn sol euq odaD
1 n2 atsah 0 edsed nav euq serolav renet nedeup stib n ed selarutan soiranib soremn soL
stib 8 ed soremn somerdnopus ,ojif oamat neneit rodanedro nu rop sodasu soremn sol euq odaD ongis ed tib otnitsid orep ,avitisop nisrev us euq dutingam ed stib somsim sol eneit ovitagen oremn nU oremn led dutingam al natneserper stib ed otser le y oremn led ongis le atneserper adreiuqzi al a sm tib lE
Signo-magnitud
ovitagen ongis le arap 1 nu azilitu eS ovitisop ongis le arap 0 nu azilitu eS
0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1
26 25 24
23 22
21
20
16 + 4 + 1 16 + 4 + 1
binario
111
110
101
100
011
010
001
000
21 21
decimal
16 15
odaesed ol ed sotnel sm res a nedneit dutingam ongis ne socitmtira sotiucric sol ,senoicarapmoc razilaer natisecen atser y amus ed senoicarepo sal euq odaD ratser ed omoc ramus ed otnat secapac sotiucric renet oirasecen se orep ,satser y samus ne esodnsab esrecah nedeup nisivid al y nicacilpitlum aL odacifingis omsim le noc orep ,ovitagen orto y ovitisop onu ,sorec sod netsixe dutingam-ongis otamrof le nE
Desventajas en signo-magnitud
ovitagen se odatluser le oirartnoc osac ne ;ovitisop se odatluser le ongis omsim le neneit sodnarepo sol iS sedutingam sal nedivid o nacilpitlum eS royam al ed ongis le enop es y ronem al sonem royam dutingam al atser es ,otnitsid se sodnarepo sol ed ongis le iS ongis omsim le eneitnam es y sedutingam sal namus es omsim le se sodnarepo sol ed ongis le iS sodnarepo sol ed dutingam al y ongis le narapmoc eS
Aritmtica en signo-magnitud
18 17
01
ovitisop oremn etneidnopserroc led 1 a otnemelpmoc le nos sovitagen soremn soL dutingam-ongis otamrof ne sovitisop soremn sol euq laugi natneserper es sovitisop soremn soL 0 rop 1 sol sodot y 1 rop 0 sol sodot odnaibmac eneitbo es oiranib oremn nu ed 1 a otnemelpmoc lE
Complemento a 1
0 0 0 1 0 1 0 1
1 1 1 0 1 0 1 0
21 21
19
20
11
)1
1n2(+
atsah )1
odatl user l a on u odn a m u s og eu l y on g is ed ti b la etn ei d nopserroc osep l ed ov i tag en ro l av l e odn an g isa al uclac es sov i tag en sor e m n sol ed l a m i ced ro lav l E
0 0 0 1 0 1 0 1 16 + 4 + 1 21
1 1 1 0 1 0 1 0 128 + 64 + 32 + 8 + 2
27 26 25 24
26 25 24
23 22
23 22
21
21
20
20
22 + 1
binario
111
110
101
100
011
010
001
000
21
decimal
22 21
1n2(
21
onu sonem esab al a otnemelpmoc us odnaluclac ovitagen a asap es odneartsus lE ovitisop eneitnam es odneunim lE
ov i tag en or to y ov i ti sop or em n n u ed am us al om oc aserpxe es sor e m n sod ed atser aL
atser ed n i carepo al ac i f i l p m is es on u son em esab al a ot n em el p m oc ne sov i tag en sore m n sol odn atneserpeR
ot i g d a oti g d ,al l i cnes a m r of ed razi laer edeup es ota m rof etse a or e m n n u ed n isr ev n oc aL
odatl u ser l a on u odnatser og eu l y or em n led sot i g d ed dadi t nac al n oc edn opserroc es euq esab al ed ai cn etop al a ol o dntser al uclac es or e m n n u ed on u son em esab al a otn e m el p m oc l E
con 3 bits
Sistema decimal Complemento a 9 Con 2 dgitos decimales 28(10) 100(10) 28(10) 1 = 71(10)
28(10)
011(2)
100(2)
71(10)
24 23
31
:stib 8 ed soremn oveun ed odneinopus ,olpmeje roP amus al ed odatluser la oerraca etse ramus somebed otcerroc rolav le renetbo araP stib 8 ne esratneserper edeup on euq ,anmuloc amitl al ne oerraca nu ricudorp edeup amus aL
Aritmtica en complemento a 1
:)etyb 1( stib 8 ed soremn odneinopus ,olpmeje roP ratser somereuq euq oremn led 1 a otnemelpmoc le ramus a sonratimil somedop ratser arap :airasecenni se atser ed nicarepo aL
Aritmtica en complemento a 1
1 0 0 0 0 0 0 0 0 1 + 0 0 0 0 0 0 0 1 + 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 1
25 24 = 25 + (24) = 1
25
26
41
arreuq es euq ol ed sotnel sm res a nedneit nibmat 1 a otnemelpmoc ne socitmtira sotiucric sol ,nicacilpmoc atse a odibeD odatluser la oerraca nu ramus euq yah saicnatsnucric sadanimreted ne euqrop nacilpmoc es serodamus sotiucric sol orep ,samus ne esodnsab esrecah nedeup atser al y nisivid al ,nicacilpitlum aL odacifingis omsim le noc orep ,ovitagen orto y ovitisop onu ,sorec sod netsixe 1 a otnemelpmoc otamrof le nE
Desventajas del complemento a 1
renet arebed euq ongis le rdnet on euqrop otneimadrobsed nu ed asuac a otcerrocni omoc odatluser nu racifitnedi somerdoP stib sodaisamed agnet odatluser le euq ,riced se ,otneimadrobsed nu elbisop se ,stib ed ajif daditnac anu neneit rodanedro nu ne soremn sol euq odaD
Desbordamiento
0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1
1 0 0 0 0 0 1 0
125
127 3
28 27
51
oremn led otser led 1 a otnemelpmoc le recah ogeul y 1 nu rartnocne atsah ovitacifingis sonem tib le rop raznemoc se ovitanretla odotm nU
1 1 1 0 1 0 1 0 + 1 1 1 1 0 1 0 1 1 21
oremn led 1 a otnemelpmoc led ovitacifingis sonem tib la onu odnamus eneitbo es oiranib oremn nu ed 2 a otnemelpmoc lE
Complemento a 2
0 0 0 1 0 1 0 1
21
30 29
61
)1
2(+ atsah )
1n 1n2( edsed nav euq serolav renet nedeup dutingam-ongis ne soremn soL
ongis ed tib la etneidnopserroc osep led ovitagen rolav le odnangisa aluclac es sovitagen soremn sol ed lamiced rolav lE
0 0 0 1 0 1 0 1 16 + 4 + 1 21
26 25 24 23 22 21 20
dutingam-ongis ne euq arenam amsim al ed aluclac es sovitisop soremn sol ed lamiced rolav lE
Valor decimal en complemento a 2
27 26 25 24
1 1 1 0 1 0 1 1 128 + 64 + 32 + 8 + 2 + 1
23 22
21
20
21
binario
111
110
101
100
011
010
001
000
decimal
32 31
71
sel autca ser odan edro sol rop odazi l i t u s m ota m r of le se 2 a otn e m el p m oc le ,so v i tom sotse roP odi pr sm ,o tnat rop ,y 1 a ot n e m el pm oc o d u ti n g a m -o n g is r op odasu l e eu q el p m is sm ,r oda m us ot i u cri c n u noc esrecah n edeup sen oi carepo sal sadoT orec l ed n i catneser per an u etsi x e ol oS
ov i tag en orto y o v i tisop o re m n n u ed am us al om oc al raser pxe odn ei t i m rep ,atser al ac i f i l pm is es esab al a ot n em el p m oc ne sov i tag en sore m n sol odn atneserpeR
or e m n led sot i g d ed dad i tnac al a et n ei dnopserroc esab al ed ai cn etop al a o l odntser al u clac es ore m n n u ed esab al a otn e m el p m oc l E
Con 3 bits
Sistema decimal Complemento a 10 Con 2 dgitos decimales 28(10) 100(10) 28(10) = 72(10)
binario
signo-magnitud
0 1 2 3 0 1 2 3
complemento a 1
0 1 2 3 3 2 1 0
complemento a 2
0 1 2 3 4 3 2 1
33
34
81
ratnese rper n edeup es euq sol ed st ib s m atisecen eu qrop otcer rocn i odat l user n u renetbo ed ,riced se ,)
ovitisop le euq royam otulosba rolav nu eneit ovitagen oremn lE ovitagen le euq royam otulosba rolav nu eneit ovitisop oremn lE
ongis otnitsid neneit soremn sod soL sovitisop nos soremn sobmA
sel bisop sen o icau t is or tauc n etsi xe
) ety b 1( stib 8 n en ei t so m erajabart euq sol noc so re m n sol eu q r en opus a som aV el lated sm n oc aci t m ti ra u s so m erai dutse ,odasu sm ota m rof le se 2 a otn e m el p m oc l e euq odaD
+ 0 0 1 1 1 0 1 0
Suma en complemento a 2
Suma en complemento a 2
1 1 1 1 0 1 1 1
0 1 1 1 1 1 0 1
125
58
36 35
91
otcerr ocn i aes odatl u ser le ,otn at rop ,y otn e i m adr obsed n u ar ru co euq ed dad i l i bi sop al etsi xe n i b mat so v i tag en n os soda m us sero lav sod so l i S
+ 1 1 0 0 0 1 1 0
+ 1 1 1 1 1 0 1 0
1 1 1 1 1 0 1 0 1
Suma en complemento a 2
Suma en complemento a 2
1 0 0 0 0 0 1 1
1 1 1 1 1 0 1 1
0 1 0 0 1 0 0 1
Carry!! Se descarta Overflow!! El resultado debe ser negativo Carry!! Se descarta y el resultado es correcto
1 1 1 1 1
125
11
58
38 37
02
ot n ei m adrobsed n u arr uco euq ed dadi l i bisop a l odn al or tn oc y recerapa adeu p euq oerraca arei u ql auc o dnatracsed ,n a m us es y odatser or e m n led 2 a otn em e l p m oc le al uclac es sor e m n sod ratser araP
otcerroc se odatl u ser le y atracsed es orep ,oe rraca n u recerapa edeu p ov i tag en led l e euq r oy am se ov i ti sop ore m n l ed otu l osba ro lav l e odn auC o tn e i m adrobsed n u arr uco eu q el bi so p m i se o n g is otn i tsi d n en ei t soda m us sero lav sod so l i S
1 0 0 0 1 1 1 0 0
+ 1 1 1 0 0 0 1 1
1 0 0 0 1 1 1 0 0
+ 1 1 1 0 0 0 1 1
Resta en complemento a 2
Suma en complemento a 2
0 0 1 1 1 0 0 1
57 29 = 57 + ( 29) = 28
0 0 1 1 1 0 0 1
29
29
28
57
28
57
40 39
Resta en complemento a 2
arei u ql auc o dnatracsed ,n a m us es y odatser or e m n led 2 a otn em e l p m oc le al uclac es sor e m n sod ratser araP
+ 1 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1
Carry!! Se descarta
Aritmtica binaria
0 + 0 0 + 0 0 0 0
Aritmtica binaria
12
dadi l i bisop a l odn al or tn oc y recerapa adeu p euq oerraca sol som atse r o so m a m us ,riced se ,av i taicosa dadei porp al so m aci l pa sor em n so i rav ratser o r a m us araP ot n ei m adrobsed n u arr uco euq ed
1 0 0 0 0 0 1 1
125
58
41
22
sod narepo so l ed n i catneser per al euq sti b s m ag net odat l user l e eu q el bisop etnatsab sE
laer o i ranib a sodasap res n ebed raci l pi t l u m a sor em n sol ,so n g is sol rabo rpm oc ed supseD
ovitagen se odatluser le ,ongis otnitsid ed nos iS ovitisop se odatluser le ,ongis omsim led nos iS
sodac i l pi t l u m sor em n sol ed s on g is so l ed edneped o datl u ser led o n g is l E
odatluser le ad son selaicrap sotcudorp sol ed amus aL adreiuqzi al a tib nu azalpsed es laicrap otcudorp adaC rodacilpitlum led tib adac rop odnacilpitlum le acilpitlum eS
sel aicrap s otcu dorp so l ed le se n m oc s m odot m l E
Multiplicacin en complemento a 2
Multiplicacin en complemento a 2
3x3=9
11 x 11 = 1001
43
44
32
ongis ed tib le somarongi ogeul y ovitagen oremn led 2 a otnemelpmoc le somecahseD ovitisop oremn led ongis ed tib le somarongI
Multiplicacin en complemento a 2
Multiplicacin en complemento a 2
83 = 01010011 59 = 11000101
83 = 01010011 59 = 11000101
59 = 00111011
+ 1 + 1 1 0
+ 1 1 1 0 0 0 0 1 0 1 +
0 1 0 x0 0 1 1 0 + 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 0 0 1
1 1 1 0 1 0 1 1 1 1 0
0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1
45
46
42
et n edi n opserroc o v i ti sop le n e odi tr evnoc res ebed o v i tag en or e m n r ei u ql auc ,son g is sol rab orp m oc sarT
ovitagen se odatluser le ,ongis otnitsid ed nos iS ovitisop se odatluser le ,ongis omsim led nos iS
n i si v i d al ed sodn arepo sod sol ed s on g is so l ed edneped o datl u ser led o n g is l E
seroda m us soti u cr ic n oc esrazi laer edeu p n i si v id al ,sa m u s nos 2 a otn e m el pm oc ne satser sal euq odaD atser al ne odasab tse serodan edro sol ne odasu n i si v i d ed ocisb a m euqse l E
o m si m led 2 a ot n em el pm oc l e so m al uclac ,o v i tagen are ets eu q oda n i m reted so m a bah eu q odad y ,o datl user le od i netbo zev anU
otneimadrobsed nu odibah rbah o ovitisop res ebed ongis ed tib le ,sovitisop soremn sod odacilpitlum someh euq odaD serodacilpitlum raesid arap otse radrocer etnatropmi reS stib 61 eneit odatluser le euq somerdnopuS
0001001100100001
0001001100100001
Divisin en complemento a 2
Multiplicacin en complemento a 2
1110110011011111
48 47
52
etneicoc la onu ramus a odneivlov y laicrap otser led rosivid le odnatser ,osecorp le somiteper ,ovitisop se laicrap otser le iS adazilanif rop nisivid al somad ,ovitagen o orec se laicrap otser le iS
01100100 00011001 01100100 + 11100111 = 101001011 C=C+1=0+1=1
4 = 52 / 0 01 : ol p m ejE
Divisin en complemento a 2
C=0
50 49
Divisin en complemento a 2
Aritmtica binaria
Aritmtica binaria
62
ovitisop ongis ,osac etse ne ,otcerroc le se ongis ed tib le euq ed esrarugesa adeuq olS animret nisivid al euq ol rop ,orec se laicrap otser lE
:nicareti adnugeS
01001011 00011001 01001011 + 11100111 = 100110010 C = C + 1 = 1 + 1 = 10
:nicareti arecreT
00110010 00011001 00110010 + 11100111 = 100011001 C = C + 1 = 10 + 1 = 11
51
Divisin en complemento a 2
:nicareti atrauC
C = 0000100 C = 00000100
52
72
soirasecen sotiucric sol ed oesid le adidem narg ne racifilpmis etimrep euqrop sovitagen soremn ratneserper arap 2 a otnemelpmoc ed otamrof le etnemlareneg nazilitu selautca serodanedro soL sovitagen soretne soremn ed nicatneserper al netimrep euq sotamrof soirav netsixE nazilaer sal euq selatigid sotiucric sol ed oesid le arap etnatropmi se airanib acitmtira al ed sacisb senoicarepo sal ed nisnerpmoc aL
Resumen
54 53
82
l ati gi D o e si D e d s o i p i c ni r P
0002 ,llaH ecitnerP dyolF .L samohT 2 olutpaC
7 9 9 1 ,ll a H e cit n er P i k sj a G . D l ei n a D 2 ol ut p a C
Aritmtica binaria
Bibliografa
55