revision for a level year 2. * ttl stands for transistor transistor logic * ttl operates on a power...

20
Revision for A level year 2 * Bits, Bytes and Nibbles

Upload: mariah-chase

Post on 24-Dec-2015

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

Revision for A level year 2

*Bits, Bytes and Nibbles

Page 2: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

TTL Fundamentals

*TTL stands for Transistor Transistor Logic

*TTL operates on a power supply of 5 volts

*The power supply tolerance for TTL logic is less than 10% ideally.

*TTL is used in digital electronics

Page 3: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*TTL Fundamentals

*Digital systems are different from analogue systems in the following ways

*Analog = Continuously variable voltage

*Digital = Discrete steps of voltage

*Think about climbing a hill

*A hill with no steps is analogous to analog

*A hill with steps cut out is analogous to digital

Page 4: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*TTL Fundamentals

*Further differences between analog and digital

*Analog = amplification

*Digital = switching

*Analog = voltages

*Digital = numbers

Page 5: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Digital Fundamentals

*So digital systems sample analog voltages

*The value of each sample is stored as a number

*The sampling is carried out by an analog to digital converter (ADC)

*The digital number can be stored in computer memory either RAM or ROM

Page 6: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Digital Fundamentals

*Each digital number is stored in binary code

*Binary code is a system of representing numbers using 1’s and 0’s

*In TTL systems a 1 = 2-5 volts = High = True

*In TTL systems a 0 = 0-0.8 volts = Low = False

Page 7: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Digital Fundamentals

*Each 1 or 0 which makes up a digital number is known as a bit

*There are 8 bits in each byte

*There are 4 bits in each nibble

*The more bits that are used to take a sample of an analog voltage the greater the accuracy of the sample

Page 8: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*A 4 bit system

*This diagram shows how a 4 bit system could reproduce (a very rough version) of a sine wave

Page 9: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*4 bit systems

*Note the 4 bit system has 16 possible values

*You can find the maximum amount of values any digital system can represent with the equation:

*Maximum possible values = 2nbits

Page 10: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Bits n pieces

*So if the maximum amount of values available is equal to 2 to the power of the number of bits.

*Determine the maximum number of values that can be represented by:

*An 8 bit system

*A 16 bit system

Page 11: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Binary representation

Page 12: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Binary Representation

*So to summarize

*Any decimal number can be represented by a binary code

*The more bits a system has the more numbers that can be represented

*In electronic systems the bits are stored as voltages

Page 13: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Binary code

*Binary code can be read in series, where each bit follows one by one. This is known as serial transmission

Page 14: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Binary code

*Parallel transmission

*This is where each bit of the code is represented and transmitted at the same time, not bit by bit as in serial

*Potentially it could be far quicker than serial transmission but does suffer from one major drawback. What do you think it could be?

Page 15: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Decimal to binary conversion

*Repeated division by 2

*Convert 46 10 to binary

*Procedure

*46/2 = 23 remainder 0 therefore LSB = 0

*23/2 = 11 remainder 1 … second LSB = 1

*11/2 = 5 remainder 1 …………………….= 1

*5/2 = 2 remainder 1 …………………….= 1

*2/2 = 1 remainder 0…………………….= 0

*1/2 = 0 remainder 1…………… MSB = 1

Therefore 4610 = 1011102

Page 16: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Repeated division by 2

*Convert the following decimal values to binary using repeated division by 2

*255

*124

*39

Page 17: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Hexadecimal

*Hexadecimal is a very convenient way of representing binary numbers in base 16

Because it is base 16, letters are used to represent the numbers in the upper register

Page 18: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Binary to Hex conversion

*Convert 0001 1111 to hexadecimal

*From the table 0001 = 1, 1111 = F

*Therefore 0001 1111 = 1F in hexadecimal

*Convert 0001 0101 1100 1110 to hex

Page 19: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Hex to binary conversion

*Convert 7EF8 to binary

*From the table

*7 = 0111

*E = 1110

*F = 1111

*8 = 1000

*Therefore 7EF8 = 0111 1110 1111 1000

*Convert 8FAC to binary

Page 20: Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for

*Hex and binary

*The most useful properties of the hexadecimal system are the ability to store more digital information in fewer digits and also as a shorthand way of representing very large binary numbers.

*Once you have done a few conversions you will see how easy it is

*Being comfortable with hexadecimal representation will help greatly when you begin to work with programming microcontrollers