


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
computer technology is based on electronic curcuits
Typology: Slides
1 / 34
This page cannot be seen from the preview
Don't miss anything!



























0.
1. Computer information representationp
p A computer receives, stores, processes, transmits
data.
Data^ types
:^ numbers characters
sounds^ (audio)
pictures
Data^ types
:^ numbers,
characters,
sounds^ (audio),
pictures
(video), etc.Data encoding: strings of
zeroes and ones
.
Computer technology is based on electronic circuits able to process vectors of 0’s and 1’s (theso-called^ digital electronic circuits
). For that reason all data are encoded by strings of 0’s and 1’s.
This type of information encoding is called
binary encoding system.
0.
2.1 Decimal system
y
-^ Uses ten
digits :
-^ Positional
system^ :^ a weight is associated to every digit position so that position is relevant.
(weights)^
2 1 1010
(^010)
Example:^
(weights)^
2 1 1010
010 653 = 6·
0 6 hundreds, 5 tens, 3 units
0.
2.2 Binary system
y^ y
-^ Uses two digits (binary digits,
bits ):^ 0, 1
-^ Positional
system.
Example:^
(weights)^
3 2 2 2
1 02 2
-^ To compute the decimal representation, add up the weights corresponding to the1’s of the binary representation:
3 2
1 0 (1101)^ = 1·2^2
0.
Exercise
( solution
) Compute the decimal representation of the following binary number: (101001)
2
(^
) 1 0
weights^
5 2 2 4 3 2
2 2 2 1 0 2
0.
2.2 Binary system: representation range •^ Pure binary system:
non-negative number
representation.
-^ With^
y^ y^ n^ n bits:^^2 distinct values.
p^
g
-^ Representation range:
n^ 0 to 2- 1
EXAMPLE:^
Binary^
Decimal^
Binary^
Decimal
n = 4 bits16 different combinationsfrom 0 to 15 = 2
4 -
0000
0
1000
8
0001
1
1001
9
0010
2
1010
10
0011
3
1011
11
0011
3
1011
11
0100
4
1100
12
0101
5
1101
13
0110
6
1110
14
0110
6
1110
14
0111
7
1111
15 8
0.
2.3 Hexadecimal system
y
BINARY^
HEXA 0 0 0
0 0 0 0 0
1 1
-^ Uses sixteen dígits:
0 0 1
0 2 0 0 1
1 3 0 1 0
0 4 0 1 0
1 5
-^ Positional
,^ ,^ ,^ ,^ system
(weights)^
3 2 16 16
1 016 16
0 1 0
1 5 0 1 1
0 6 0 1 1
1 7 1 0 0
0 8
-^ To compute the decimal representation, add up the digitsmultiplied by the corresponding weights:
1 0 0
1 9 1 0 1
0 A 1 0 1
1 B 1 1 0
0 C
1 1 0
0 C 1 1 0
1 D 1 1 1
0 E 1 1 1
1 F
3. Base conversion (HEXADECIMAL to BINARY)
0.
(^
)
5. Cambios de base (BINARY to HEXADECIMAL) • HEXADECIMAL to BINARY: 1 hexadecimal
digit^ →^4
bits binary^
to BINARY: 1 hexadecimal digit
→^ 4 bits. hexadecimal
binary^
-^ BINARY to HEXADECIMAL: 4 bits
→^ 1 hexadecimal digit (starting from the four
i ht^ t bit )
binary^
rightmost bits)
hexadecimal
0.
Exercise
( solution
)^110110101001100
BINARY^
HEXA 0 0 0
0 0 0 0 0
1 1
Compute the hexadecimal representation:^110110101001100
0 0 1
0 2 0 0 1
1 3 0 1 0
0 4 0 1 0
1 5
2
0 1 1
0 6 0 1 1
1 7 1 0 0
0 8
Compute the binary representation:^ 0101 1111 0010 11000101 1111 0010 11000101 1111 0010 1100 0101 1111 0010 1100
1 0 0
1 9 1 0 1
0 A 1 0 1
1 B 1 1 0
0 C 1 1 0
1 D 1 1 1
0 E 1 1 1
1 F
0.
4. Base conversion (DECIMAL to BINARY)
(^
)
(^5) • Divide the decimal number by 2. Divide the obtained quotient by 2. Keep dividingthe obtained quotients by 2 until the obtained quotient is equal to 1.the obtained quotients by 2 until the obtained quotient is equal to 1.• The base 2 number consists of the last quotient 1 and the set of previously obtainedremainders.^ Example:
(2 (^
0.
Exercise
( solution
) (^
) 43 =^ binary number? (^
43 = 21·2 + 121 = 10·2 + 110 =^ 5 ·2 + 010 =^ 5 2 + 05 =^ 2 · 2 + 12 =^ 1 · 2 + 0
0.
6.^ Sum and difference of binary numbers6. Sum and difference of binary numbersSum^ of 2 bits:0 + 0 = 00 + 1 = 1
Difference
of 2 bits: 0 - 0 = 0 1 0 = 1
(current step bit: 0,^ carry^ to the next step: 1 )
1 - 0 = 11 - 1 = 00 - 1 =^^11 (current step bit: 1
borrow to the next step: 1) 1 0 1 0 01 0 1 0 0 1 0 1 = A1 0 1 = A
carry^ to the next step: 1 )
bo^ o^ to t e
e t step:^ )
Sum^ example
Difference
example :
1 1 11 1 1^ →→^ carrycarry 1 0 1 0 01 0 1 0 0 1 0 1 =1 0 1 = AA ++ 1 1 0 10 1 0 1 10 1 1 11 = B= B
1 1 11 1 1^ →→^ carrycarry
→→^ borrowborrow 0 1 0 0 1 1 1 00 1 0 0 1 1 1 0
0.
Exercise
( solution
) 1 01 0 0 1 1 0 1 1 =0 1 1 0 1 1 = A
(^ ) A
0 0 1 0 0 1 10 0 1 0 0 1 1
→→^ carrycarry 1 1 1 0 1 1 1 01 1 1 0 1 1 1 0
11 0 0 1^11
→→^ borrowborrow
SUMMARY
0.
^ Computer information representation. ^ Numeration systems (decimal, binary, hexadecimal). ^ Pure binary system and representation range. ^ Base conversion.S^
d diff^
f bi^
b
^ Sum and difference of binary numbers.