Engineering in Kenya

Important Number Systems in Advanced Computer Science

Posted by on Mar 31, 2018 in Computer Science | 0 comments

Important Number Systems in Advanced Computer Science have particular basic that are key in the study of computer language for computer science in Kenya. Engineering in Kenya has more topics.

Important Number Systems Basics for Advanced Computer Science

Number systems as we use them in Advanced Computer Science consist of a basic set i.e. the digits, and a base (how many digits). The set of digits in Important Number Systems is denoted by Z and the base by the letter B. E.g. Z = {0,1,2,3,4,5,6,7,8,9}

B = |Z| = 10

A number in Important Number Systems for Advanced Computer Science is a linear sequence of digits. The value of a digit at a specific position depends on its assigned meaning and on its position. The value of a number is the sum of these values.

Number: NB = dn-1 dn-2…..d1d0 with word length n.

Value: NB = Σd1B1 = dn-1Bn-1+dn-2Bn-2+…..d1B1.

Useful Number Systems in Advanced Computer Science

 Name Base Digits Binary 2 0,1 Octal 8 0,1,2,3,4,5,6,7 Decimal 10 0,1,2,3,4,5,6,7,8,9 Hexadecimal sedecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Binary data representation in Advanced Computer Science

The bit is the smallest unit of information in Important Number Systems for Advanced Computer Science. It has only two options/orders to give i.e. yes/no, on/off, 1/0, 5v/0v etc. The byte consists of 8 bits;

28 = 256 different states

Word: this is the number of bits (word length) which can be processed by a computer in a single step (e.g. 32 or 64) →machine dependent.

Representation;

n-1                             3    2    1    0

….

2n-1                           8    4    2     1

The word size in Important Number Systems for any given computer is fixed. E.g. for a 16-bit word, every word (memory location) can hold a 16-bit pattern with each bit either 0 or 1.

Q: – how many distinct patterns are there in a 16-bit word?

Each bit has two possible values, 0 or 1. Therefore, one bit has two distinct patterns. Its either 0,1 or 1,0. With two bits, each position has two possible values and therefore four distinct patterns i.e. 00,01,10,11. With three bits, each position has two possible values, and thus eight distinct bit patterns i.e. 000,100,001,101,010,110,011,111.

In general, for n bits (a word of length n) in Important Number Systems for Advanced Computer Science, we have 2n distinct bit patterns.

Decimal Numbers in Important Number Systems in Advanced Computer Science

Important Number Systems in Advanced Computer Science

Remember: Z = {0,1,2,3,4,5,6,7,8,9}, and B = 10;

Each position to the left of a digit in decimal number systems in Important Number Systems for Advanced Computer Science increases by a power of ten, and each position to the right of a digit decimal number systems in Important Number Systems decreases by a power of 10. E.g. 4769210 = 2×100 + 9×101 + 6×102 + 7×103 + 4×104

Counting in binary

 Decimal Binary Decimal Binary 0 00 000 16 10 000 1 00 001 17 10 001 2 00 010 18 10 011 3 00 011 19 10 100 4 00 100 20 10 101 5 00 101 21 10 110 6 00 110 22 10 111 7 00 111 23 11 000 8 01 000 24 11 001 9 01 001 25 11 011 10 01 010 26 11 010 11 01 011 27 11 011 12 01 100 28 11 100 13 01 101 29 11 101 14 01 110 30 11 110 15 01 111 31 11 111

Octal number systems in Important Number Systems

Remember: Z = {0,1,2,3,4,5,6,7} and B = 8;

Each position to the left of a digit in octal number systems in Important Number Systems increases by a power of eight and each position to the right of a digit octal number systems in Important Number Systems for Advanced Computer Science decreases by a power of 8. E.g. 124038 = 3×80 + 0×81 + 4×82 + 2×83 + 1×84 = 537910

Counting in octal

 Decimal Octal Decimal Octal 0 0 0 16 2 0 1 0 1 17 2 1 2 0 2 18 2 2 3 0 3 19 2 3 4 0 4 20 2 4 5 0 5 21 2 5 6 0 6 22 2 6 7 0 7 23 2 7 8 1 0 24 3 0 9 1 1 25 3 1 10 1 2 26 3 2 11 1 3 27 3 3 12 1 4 28 3 4 13 1 5 29 3 5 14 1 6 30 3 6 15 1 7 31 3 7

Hexadecimal number systems in Important Number Systems

Remember: Z = {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F} and B = 16

Each position to the left of a digit for hexadecimal number systems in Important Number Systems increases by a power of 16 and each position to the right of a digit in hexadecimal number systems in Important Number Systems decreases by a power of 16.

E.g. FB40A16 = 10×160 + 0×161 + 4×162 + 11×163 + 15×164 = 1,029,13010