0% found this document useful (0 votes)
8 views12 pages

3.1 ComF 03 Number System

Uploaded by

samir241-15-361
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

3.1 ComF 03 Number System

Uploaded by

samir241-15-361
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Computer Fundamentals

Dr. M. Ismail Jabiullah


Professor
Department of CSE
Daffodil International University
Bangladesh
Number Systems
Topics

 Number System, Types of Number System


 Positional Number System, Types, Bases and Digits
 Binary Number System
 Decimal Number System
 Octal Number System
 Hexadecimal Number System
 Conversions from Decimal to Other Number Systems
 Conversions from Other Number Systems to Decimal
Number System
 Character Code,
 ASCII Code, EBCDIC Code, BCD Code
 bit, Nibble, Byte, Word, Bit-string, and
 Memory Sizes
Number Systems
• A numeral system or system of numeration is a writing system
for expressing numbers, that is a mathematical notation for
representing numbers of a given set, using graphemes or
symbols in a consistent manner.
• It can be seen as the context that allows the symbols "11" to be
interpreted as the binary symbol for three, the decimal symbol
for eleven, or a symbol for other numbers in different bases.

• Ideally, a numeral system will:


• Represent a useful set of numbers e.g. all integers, or
rational numbers
• Give every number represented a unique representation or
at least a standard representation
• Reflect the algebraic and arithmetic structure of the
numbers.
Types of Number Systems
• Positional number system and
• Non-positional number system.
Positional number systems:
• There are only few symbols, called digits, and these symbols represent different
values, depending on the position, they occupy in the number.
• The value of each digit in such a number is determined by following three
considerations:
(a) The digit itself,
(b) The position of the digit in the number, and
(c) The base of the number system

Non-positional number systems:


• Used in early days.
• In those days, human beings counted on fingers.
• When ten fingers were not adequate, stones pebbles, or sticks were used to indicate values.
• This method of counting uses an additive approach or the non-positional number system. In
this system, we have symbols, such as I for 1, II for 2, III for 3, IIII for 4, IIIII for 5, IIIIII for
6, etc. Each symbol represents the same value, regardless of its position in the number, and
the symbols are simply added to find out the value of a particular number. Since it is very
difficult to perform arithmetic with such a number system as the centuries passed.
Types of Positional Number Systems
• Binary number system
• Octal number system
• Decimal number system and
• Hexadecimal number system

Number system Base Digits


(a) Binary Number System 2 0, 1
(b) Octal Number System 8 0, 1, 2, 3, 4, 5, 6, 7
(c) Decimal Number System 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
(d) Hexadecimal Number System 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number Systems
• Convert the Number
• (786)10
• (1786)10
• (1278)10
• (1327)10
• (1618)10

into Binary, Octal and Hexadecimal Numbers and vice-versa.

• Convert the Number from Binary, Octal and hexadecimal to Decimal


• (11011.101)2 1x24+1x23+0x22+1x21+1x20+1x2-1+0x2-2+1x2-3=( )10
• (0.540)8 5x8-1+4x8-2+0x8-3=( )10
• (123.540)8 1x82+2x81+3x80+5x8-1+4x8-2+0x8-3=( )10
• (0.48)16 4x16-1+8x16-2=( )10
Bx162+5x161+Dx160+4x16-1+8x16-2=( )10
• (B5D.48)16

into Binary, Octal and Hexadecimal Numbers and vice-versa.


Number Systems
• Convert the Number
• (786)10
• (1786)10
• (1278)10
• (1327)10
• (1618)10

into Binary, Octal and Hexadecimal Numbers and vice-versa.

• Convert the Number from Binary, Octal and hexadecimal to Decimal


• (11011.101)2 27.62510
• (0.540)8 0.687510
• (123.540)8 83.687510
• (0.48)16 0.2812510
2909.2812510
• (B5D.48)16

into Binary, Octal and Hexadecimal Numbers and vice-versa.


Character Codes
• A character code is one set of symbols which can be represented in a computer
such as a number, letter, space or punctuation mark.

• There are three types of codes and they are:


• character codes,
• ASCII code and
• EBCDIC code.

• Character Code:
• Character codes are the binary patterns used to represent the character set.
• Some codes are specific to the manufacturer but there are a number of
standard codes which help the exchange of data between systems.

• ASCII Code:
• ASCII stands for American Standard Code for Information Interchange.
• It is the commonest code and is popularly used for data transmission and
microcomputer storage.
• ASCII is a 7-bit code and use three zone bits and four numeric bits to
represent characters, with an eight bit added for parity checking.
Character Codes
• EBCDIC Code:
• EBCDIC stands for Extended Binary Coded Decimal Interchange
Code.
• It was developed by IBM (International Business Machine).
• It is an 8-bit code which therefore permits 28 = 256 distinct characters.
• In computers that use EBCDIC code, each addressable unit of storage
is 8 bits in length and is referred to as a byte i.e., each character can be
stored in 1 byte of computer memory.

• BCD Code:
• The Binary Coded Decimal (BCD) code is one of the early computer
codes.
• It is based on the idea of converting each digit of a decimal number
into its binary equivalent, rather than converting the entire decimal
value into a pure binary form.
• This makes the conversion process easier. The BCD equivalent of each
decimal digit is shown in Figure 2.8. Since 8 and 9 require 4 bits, all
decimal digits are represented in BCD by 4 bits.
• For example, (42)10 is equal to (101010)2 in a pure binary form.
bit, Nibble, Byte, Word, Bit-string and Memory Sizes
• bit: All data stored in memory uses binary logic, where each binary digit or
bit can be set to 0 or 1.

• Nibble: A nibble is the number of 4 bits.

• Byte: A byte is the number of 8 bits used to represent one character.

• Word: A word consists of one or more bytes and is the largest amount of
memory that the computer can handle in any one operation.

• Word Length: Word length is the number of bits in each word of a


computer.
• In most computers this is fixed but in some it varies according to the
type of data stored; in this case instructions are provided to handle
differing numbers of bits as a unit.
• This is known as variable word length.
bit, Nibble, Byte, Word, Bit-string and Memory Sizes
• Bit String: A bit string is a group of ordered binary digits and could
represent:
• a number
• a character or string of characters
• an instruction, and
• a memory address

Memory Sizes: Memory size is measured in


kilobytes or k = 210 or 1024 bytes in 1 kilobyte = 210 bytes
megabytes or M = 210 or 1024 k bytes in 1 M byte = 220 bytes
Gigabytes or G = 210 or 1024 M bytes in 1 G byte = 230 bytes
Terabytes or T = 210 or 1024 G bytes in 1 T byte = 240 bytes
Thanks

You might also like