Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Number Systems, Data Types, Codes Logic Gates: An Introduction University Cork IRELAND College Number Systems • Base • Digit values • Positional values -- integer powers of base • Zero (0) to represent nothing in a given position • Value of number = sum of products of digits and their positional values University Cork IRELAND College Computer Number Systems University Cork IRELAND College System Base Digits Binary 2 0, 1 Octal 8 Decimal 10 Hexadecimal 16 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 0-9, A, B, C, D, E, F Octal and Binary Digits University Cork IRELAND College Octal Binary Octal Binary 0 1 2 3 000 001 010 011 4 5 6 7 100 101 110 111 Hexadecimal and Binary Digits University Cork IRELAND College Hex Binary Hex Binary 0 1 2 3 4 5 6 7 0000 0001 0010 0011 0100 0101 0110 0111 8 9 A B C D E F 1000 1001 1010 1011 1100 1101 1110 1111 Data Types • Numeric data – binary integer – floating-point – decimal value • String data – a.k.a. character data – one character per byte – 8-bit code such as ASCII or EBCDIC University Cork IRELAND College ASCII and EBCDIC Codes. Character University Cork IRELAND College ASCII EBCDIC 0 1 2 3 4 5 6 7 8 9 0101 0000 0101 0001 0101 0010 0101 0011 0101 0100 0101 0101 0101 0110 0101 0111 0101 1000 0101 1001 1111 0000 1111 0001 1111 0010 1111 0011 1111 0100 1111 0101 1111 0110 1111 0111 1111 1000 1111 1001 A B C D E F G H I 1010 0001 1010 0010 1010 0011 1010 0100 1010 0101 1010 0110 1010 0111 1010 1000 1010 1001 1100 0001 1100 0010 1100 0011 1100 0100 1100 0101 1100 0110 1100 0111 1100 1000 1100 1001 Character ASCII EBCDIC J K L M N O P Q R 1010 1010 1010 1011 1010 1100 1010 1101 1010 1110 1010 1111 1011 0000 1011 0001 1011 0010 1101 0001 1101 0010 1101 0011 1101 0100 1101 0101 1101 0110 1101 0111 1101 1000 1101 1001 S T U V W X Y Z 1011 0011 1011 0100 1011 0101 1011 0110 1011 0111 1011 1000 1011 1001 1011 1010 1110 0010 1110 0011 1110 0100 1110 0101 1110 0110 1110 0111 1110 1000 1110 1001 Logic Gates University Cork IRELAND College • Electronic circuits which combine digital signals according to the Boolean algebra are referred to as logic gates • Gates because they control the flow of information. • Positive logic is an electronic representation in which the true state (1) is at a higher voltage, while negative logic has the true state (0) at a lower voltage. Logic Circuit Families • Logic circuits are grouped into families, each with their own set of detailed operating rules. Some common logic families are: – RTL: resistor-transistor logic, – DTL: diode-transistor logic, – TTL: transistor-transistor logic, • TTL is normally used for small-scale integrated circuit units – NMOS: N-channel metal-oxide silicon, • MOS features very low power consumption and is used in VLSI technology – CMOS: complementary metal-oxide silicon and – ECL: emitter-coupled logic. University Cork IRELAND College • ECL is very fast The. The TTL is normally used for small-scale integrated circuit units Logic Gate Building Blocks • Symbols and truth tables for the four basic twoinput gates: a) AND, b) NAND, c) OR, d) NOR and e) the inverter. – The open circle is used to indicate the NOT or negation function and can be replaced by an inverter in any circuit. – A signal is negated if it passes through the circle. – Any logic operation can be formed from NAND or NOR gates or a combination of both. We also commonly have gates with more than two inputs. – Inverter gates can be formed by applying the same logic signal to both inputs of an NOR or NAND gate. University Cork IRELAND College Examples of Logic Gates University Cork IRELAND College