CHAPTER – 02
NUMBER SYSTEM
Unit 1
Computer Systems and Organisation
(CSO)
XI
Computer Science (083)
Board : CBSE
Unit I
Computer Systems and Organisation (CSO)
(10 Theory + 02 Practical)
DCSc & Engg, PGDCA,ADCA,MCA.MSc(IT),Mtech(IT),MPhil (Comp. Sci)
Department of Computer Science, Sainik School Amaravathinagar
Cell No: 9431453730
Praveen M Jigajinni
Prepared by
Courtesy CBSE
INTRODUCTION
INTRODUCTION
"A set of values used to represent different
quantities is known as “Number System". For
example, a number system can be used to
represent the number of students in a class or
number of viewers watching a certain TV
program etc. The digital computer represents
all kinds of data and information in binary
numbers. It includes audio, graphics, video, text
and numbers. The total number of digits used in
a number system is called its base or radix. The
base is written after the number as subscript
such as 51210.
TYPES OF NUMBER SYSTEMS
TYPES OF NUMBER SYSTEMS
1. BINARY NUMBER SYSTEM
2. OCTAL NUMBER SYSTEM
3. DECIMAL NUMBER SYSTEM
4. HEXA DECIMAL NUMBER SYSTEM
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
The binary number system is a
numbering system that represents numeric
values using two unique digits (0 and 1). Most
computing devices use binary numbering to
represent electronic circuit voltage state, (i.e.,
on/off switch), which considers 0 voltage
input as off and 1 input as on.
BINARY NUMBER SYSTEM ADVANTAGES
BINARY NUMBER SYSTEM ADVANTAGES
1. Binary is extremely simple to
implement. Any system that has an "on"
and "off" or "high" and "low" state can be
used to encode and/or manipulate data.
2. Binary is the lowest "base" possible (base
2) and hence any higher counting system
can be easily encoded (e.g. decimal, octal,
hexadecimal, etc.)
BINARY NUMBER SYSTEM ADVANTAGES
3. Binary would be the most effective way to
attempt to communicate with any type of
alien civilization. Just as "math" is a type of
universal language (any alien civilization
would understand a sequence of prime
numbers, for example) binary is a universal
alphabet.
BINARY NUMBER SYSTEM ADVANTAGES
4. Binary data is extremely robust in
transmission because any noise tends to be
neither fully "on" or "off" and is easy to
reject.
5. Binary would be the most effective way to
attempt to communicate with any type of alien
civilization. Just as "math" is a type of universal
language (any alien civilization would
understand a sequence of prime numbers, for
example) binary is a universal alphabet.
APPLICATIONS OF BINARY NUMBER SYSTEM
APPLICATIONS OF BINARY NUMBER SYSTEM
1. The most common application for the binary
number system can be found in computer
technology.
2. Digital encoding is the process of taking data
and representing it with discreet bits of
information. These discreet bits consist of
the 0s and 1s of the binary system.
For example, the images you see on your
computer screen have been encoded with a
binary line for each pixel.
APPLICATIONS OF BINARY NUMBER SYSTEM
If a screen is using a 16-bit code, then each
pixel has been told what color to display
based on which bits are 0s and which bits
are 1s. As a result, 2^16 represents 65,536
different colors!
3. We also find the binary number system in a
branch of mathematics known as
Boolean Algebra.
BINARY REPRESENTATION OF INTEGER
BINARY REPRESENTATION OF INTEGER
1.Sign and magnitude representation is the
conventional form of number system. It is
represented as signs ( + or - ).
2.One,s complement represents positive
numbers by their binary equivalent called
true value.
3.Two complement representation represents
their binary equivalent numbers and
negative numbers by their second
compliment form.
BINARY REPRESENTATION OF INTEGER
 Real numbers are represented in storage
medium by their exponents and mantissa.
For example numbers 32.17 can be written
as 0.3217*102, 0.3217is its mantissa and 2
is its exponent.
MORE ON BINARY NUMBER SYSTEM
MORE ON BINARY NUMBER SYSTEM
Binary is the language of
computers. Everything you type, input,
output, send, retrieve, draw, paint, or
place blame on when something
doesn't work is, in the end, converted to
the computer's native language- binary.
A single binary 1 or a single binary
0 is called a bit, which is short for
"binary digit".
MORE ON BINARY NUMBER SYSTEM
Four bit binary number is called nibble
1 0 1 0
Eight bits together makes most used
computer term byte A single byte can
represent the decimal values 0 to 255 (256
distinct values)
1 0 1 0 1 1 0 1
MORE ON BINARY NUMBER SYSTEM
Place a couple of bytes together to
represent a single value and you have a 16-bit
word (2 bytes = 16- bits). A 16-bit word can
represent the values 0 to 65535 (65536 distinct
values).
1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1
32-bit words are 4 bytes in length. They can
represent a value from 0 to 4,294,967,295
(4,294,967,296 distinct values)
BINARY TO DECIMAL
BINARY TO DECIMAL
Example binary number: 10001010
Binary representation of decimal 138.
Now, look at those numbers above the
boxes with the red 1s and 0s. Those are decimal
numbers representing powers of 2.
BINARY TO DECIMAL
These are the values that are above the
boxes. Now the actual binary number itself
consists of 1s and 0s in the blue boxes which
somehow magically represents the decimal
number 138. How do we get 138 from
10001010? In the binary number when you see
a 1, multiply that 1 times the value that is
directly over it. Where you see a 0 in the box,
just ignore it.
Black board Teaching - Various (From & to)
Binary number conversion techniques.
OCTAL NUMBER SYSTEM
OCTAL NUMBER SYSTEM
Octal was widely used some 50 years
ago by Digital Equipment Corp. (DEC) and
other companies that had computers
with a 12-bit word (e.g. the PDP-8) or
other multiples of six, such as 18 and 36
(e.g. UNIVAC 1108). I used both the PDP-
8 and UNIVAC 1108 in grad school.
Characters in both machines typically
used six bits, not 8.
OCTAL NUMBER SYSTEM
According to Wikipedia, octals aren't
as common as they used to be. As others
have already mentioned, in the past,
systems used to have a 12/24/36-bit
word, which is more easily represented in
octal than hexadecimal, but currently, the
x86 and i64 architectures use a 16/32/64
bit word, which is more easily
represented in hexadecimal and
downright ugly in octal.
OCTAL NUMBER SYSTEM APPLICATIONS
OCTAL NUMBER SYSTEM APPLICATIONS
1. Octal is used less these days, but C’s
standard IO functions allow specifying
characters that way.
2. Representation of IP addresses (rare,
sometimes used by spammers to obscure
addresses). Microsoft accepts octal IP
numbers for Ping and FTP.
3. Representation of UTF8 numbers (any
start byte is 3nn and any continuation
byte 2nn).
OCTAL NUMBER SYSTEM APPLICATIONS
4. "Real" real-world use: the Yuki people
and in the native Mexican Pamean languages
use octal counting because they count the
spaces between their fingers
5. Historically in the 1950's, one of the
oldest debuggers, UT-3 for the TX-0
computer at MIT (an 18-bit system), could
only be operated by using commands
written in octal notation.
6. TAR files store some information in
octal representation.
7. When fields are naturally divided
into three or six bits, octal
representation comes in handy .
8. Integers, but also fractions on the
Honeywell and other legacy systems
were represented as octal.
OCTAL NUMBER SYSTEM APPLICATIONS
9. A whole lot of legacy (CDC machines,
DEC PDP-8 etc), because they used multiples
of 3 bits, like 6-bit or 12-bit word sizes.
10. In 1971, octal numbers were proposed
to replace the decimal system.
11. And finally, most trivially: you use it
almost everyday when you write down the
number 0 in some programming language
that supports octals.
OCTAL NUMBER SYSTEM APPLICATIONS
12. Codes squawked by Mode 3A
transponders in airplanes.
13. Key codes in the ncurses library
(ncurses (new curses) is a programming
library providing an application
programming interface(API) that allows
the programmer to write text-based
user interfaces in a terminal-
independent manner. It is a toolkit for
developing …
OCTAL NUMBER SYSTEM APPLICATIONS
"GUI-like" application software that runs
under a terminal emulator. It also
optimizes screen changes, in order to
reduce the latency experienced when
using remote shells.)
OCTAL NUMBER SYSTEM APPLICATIONS
HEXA DECIMAL NUMBER SYSTEM
HEXA DECIMAL NUMBER SYSTEM
Ah, hexadecimal. If you've ever
worked with colors in web page design,
you've proably seen something like ' or
something to that effect. Somehow, that 6
digit hexadecimal number is equal to a
lavender or light purple color. What on
earth does 'A09CF3' mean? Before we
explain that, let's look at what
hexadecimal (hex) is.
HEXA DECIMAL NUMBER SYSTEM
Our decimal system, as mentioned in
my Binary Tutorial, is a base-10 system,
meaning we can count to any number in
the universe using only 10 symbols or
digits, 0 thru 9. For the computer, a 10-
based system probably isn't the most
efficient system, so the computer uses
binary (in reality, it uses microscopic
switches which are either on or off, but we
represent them using the digits '1' and '0').
HEXA DECIMAL NUMBER SYSTEM
Unfortunately, binary isn't very efficient
for humans, so to sort of find a happy
middle ground, programmers came up
with hexadecimal. Hexadecimal is a base-
16 number format (hex=6, decimal=10).
This means that instead of having only the
digits from '0' to '9' to work with like our
familiar decimal, or '1' and '0' like binary,
we have the digits '0' to '15'.
HEXA DECIMAL NUMBER SYSTEM
It also means that we are using the powers
of 16, instead of the powers of 2 like in
binary
As soon as you count over 9 in hex, new
digits take over. A=10, B=11, C=12, D=13, E=14
and F=15.
HEXA DECIMAL NUMBER SYSTEM
0x0F In fact, the '0x' in front of a hex
number is more current than the '$'. The
'$' is sort of old school. Whether you use a
'$' or a '0x', it tells you that you're working
with a hex number, not a decimal
HEXA DECIMAL NUMBER SYSTEM APPLICATIONS
HEXA DECIMAL NUMBER SYSTEM APPLICATIONS
1. To define locations in memory. Hexadecimals
can characterise every byte as two hexadecimal
digits only compared to eight digits when using
binary.
2. To define colours on web pages. Each primary
colour – red, green and blue is characterised by
two hexadecimal digits. The format being used
is #RRGGBB. RR stands for red, GG stands for
green and BB stands for blue.
HEXA DECIMAL NUMBER SYSTEM APPLICATIONS
3. To represent Media Access Control (MAC)
addresses. MAC addresses consist of 12-digit
hexadecimal numbers. The format being used is
either MM:MM:MM:SS:SS:SS or MMMM-MMSS-
SSSS. The first 6 digits of the MAC address
represent the ID of the adapter manufacturer
while the last 6 digits represent the serial number
of the adapter.
4. To display error messages. Hexadecimals are
used to define the memory location of the
error. This is useful for programmers in finding
and fixing errors.
ASCII
The American Standard Code for
Information Interchange (ASCII) is a
character-encoding scheme originally based
on the English alphabet. ASCII codes
represent text in computers,
communications equipment, and other
devices that use text. Most modern
character-encoding schemes are based on
ASCII, though they support many more
characters than ASCII does.
ASCII
ASCII Character Set
ISCII
ISCII
In recent past the computer activities
were limited to specific languages and with
the increase in works there was to be
develop a slandered code . In 1991, the
bureau of Indian standard develop common
code called ISCII. this is a 8-bit code capable
of coding 256 characters.
UNICODE
UNICODE
 Unicode provides a unique number for every
character,
 No matter what the platform
 No matter what the program.
 No matter what the language.
INDIAN LANGUAGES ON UNICODE
The standard has incorporated Indian
scripts under group name Asian scripts ,
includes Devnagari , Bengali ,Tamil ,Malayalam.
CLASS TEST
CLASS TEST
1. Write a note on ASCII 05
2. Write a note on Unicode 05
3. Convert the following 10
(i) (1111000)2 = (?) 10
(ii) (234)10 = (?)8
(iii) (564)8 = (?)16
(iv) (AA)16 = (?)10
(v) (555)8 = (?)2
Time: 40 Min Max Marks 20
Thank You

Chapter 4 number system

  • 1.
    CHAPTER – 02 NUMBERSYSTEM Unit 1 Computer Systems and Organisation (CSO) XI Computer Science (083) Board : CBSE
  • 2.
    Unit I Computer Systemsand Organisation (CSO) (10 Theory + 02 Practical) DCSc & Engg, PGDCA,ADCA,MCA.MSc(IT),Mtech(IT),MPhil (Comp. Sci) Department of Computer Science, Sainik School Amaravathinagar Cell No: 9431453730 Praveen M Jigajinni Prepared by Courtesy CBSE
  • 3.
  • 4.
    INTRODUCTION "A set ofvalues used to represent different quantities is known as “Number System". For example, a number system can be used to represent the number of students in a class or number of viewers watching a certain TV program etc. The digital computer represents all kinds of data and information in binary numbers. It includes audio, graphics, video, text and numbers. The total number of digits used in a number system is called its base or radix. The base is written after the number as subscript such as 51210.
  • 5.
  • 6.
    TYPES OF NUMBERSYSTEMS 1. BINARY NUMBER SYSTEM 2. OCTAL NUMBER SYSTEM 3. DECIMAL NUMBER SYSTEM 4. HEXA DECIMAL NUMBER SYSTEM
  • 7.
  • 8.
    BINARY NUMBER SYSTEM Thebinary number system is a numbering system that represents numeric values using two unique digits (0 and 1). Most computing devices use binary numbering to represent electronic circuit voltage state, (i.e., on/off switch), which considers 0 voltage input as off and 1 input as on.
  • 9.
  • 10.
    BINARY NUMBER SYSTEMADVANTAGES 1. Binary is extremely simple to implement. Any system that has an "on" and "off" or "high" and "low" state can be used to encode and/or manipulate data. 2. Binary is the lowest "base" possible (base 2) and hence any higher counting system can be easily encoded (e.g. decimal, octal, hexadecimal, etc.)
  • 11.
    BINARY NUMBER SYSTEMADVANTAGES 3. Binary would be the most effective way to attempt to communicate with any type of alien civilization. Just as "math" is a type of universal language (any alien civilization would understand a sequence of prime numbers, for example) binary is a universal alphabet.
  • 12.
    BINARY NUMBER SYSTEMADVANTAGES 4. Binary data is extremely robust in transmission because any noise tends to be neither fully "on" or "off" and is easy to reject. 5. Binary would be the most effective way to attempt to communicate with any type of alien civilization. Just as "math" is a type of universal language (any alien civilization would understand a sequence of prime numbers, for example) binary is a universal alphabet.
  • 13.
  • 14.
    APPLICATIONS OF BINARYNUMBER SYSTEM 1. The most common application for the binary number system can be found in computer technology. 2. Digital encoding is the process of taking data and representing it with discreet bits of information. These discreet bits consist of the 0s and 1s of the binary system. For example, the images you see on your computer screen have been encoded with a binary line for each pixel.
  • 15.
    APPLICATIONS OF BINARYNUMBER SYSTEM If a screen is using a 16-bit code, then each pixel has been told what color to display based on which bits are 0s and which bits are 1s. As a result, 2^16 represents 65,536 different colors! 3. We also find the binary number system in a branch of mathematics known as Boolean Algebra.
  • 16.
  • 17.
    BINARY REPRESENTATION OFINTEGER 1.Sign and magnitude representation is the conventional form of number system. It is represented as signs ( + or - ). 2.One,s complement represents positive numbers by their binary equivalent called true value. 3.Two complement representation represents their binary equivalent numbers and negative numbers by their second compliment form.
  • 18.
    BINARY REPRESENTATION OFINTEGER  Real numbers are represented in storage medium by their exponents and mantissa. For example numbers 32.17 can be written as 0.3217*102, 0.3217is its mantissa and 2 is its exponent.
  • 19.
    MORE ON BINARYNUMBER SYSTEM
  • 20.
    MORE ON BINARYNUMBER SYSTEM Binary is the language of computers. Everything you type, input, output, send, retrieve, draw, paint, or place blame on when something doesn't work is, in the end, converted to the computer's native language- binary. A single binary 1 or a single binary 0 is called a bit, which is short for "binary digit".
  • 21.
    MORE ON BINARYNUMBER SYSTEM Four bit binary number is called nibble 1 0 1 0 Eight bits together makes most used computer term byte A single byte can represent the decimal values 0 to 255 (256 distinct values) 1 0 1 0 1 1 0 1
  • 22.
    MORE ON BINARYNUMBER SYSTEM Place a couple of bytes together to represent a single value and you have a 16-bit word (2 bytes = 16- bits). A 16-bit word can represent the values 0 to 65535 (65536 distinct values). 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 32-bit words are 4 bytes in length. They can represent a value from 0 to 4,294,967,295 (4,294,967,296 distinct values)
  • 23.
  • 24.
    BINARY TO DECIMAL Examplebinary number: 10001010 Binary representation of decimal 138. Now, look at those numbers above the boxes with the red 1s and 0s. Those are decimal numbers representing powers of 2.
  • 25.
    BINARY TO DECIMAL Theseare the values that are above the boxes. Now the actual binary number itself consists of 1s and 0s in the blue boxes which somehow magically represents the decimal number 138. How do we get 138 from 10001010? In the binary number when you see a 1, multiply that 1 times the value that is directly over it. Where you see a 0 in the box, just ignore it.
  • 26.
    Black board Teaching- Various (From & to) Binary number conversion techniques.
  • 27.
  • 28.
    OCTAL NUMBER SYSTEM Octalwas widely used some 50 years ago by Digital Equipment Corp. (DEC) and other companies that had computers with a 12-bit word (e.g. the PDP-8) or other multiples of six, such as 18 and 36 (e.g. UNIVAC 1108). I used both the PDP- 8 and UNIVAC 1108 in grad school. Characters in both machines typically used six bits, not 8.
  • 29.
    OCTAL NUMBER SYSTEM Accordingto Wikipedia, octals aren't as common as they used to be. As others have already mentioned, in the past, systems used to have a 12/24/36-bit word, which is more easily represented in octal than hexadecimal, but currently, the x86 and i64 architectures use a 16/32/64 bit word, which is more easily represented in hexadecimal and downright ugly in octal.
  • 30.
    OCTAL NUMBER SYSTEMAPPLICATIONS
  • 31.
    OCTAL NUMBER SYSTEMAPPLICATIONS 1. Octal is used less these days, but C’s standard IO functions allow specifying characters that way. 2. Representation of IP addresses (rare, sometimes used by spammers to obscure addresses). Microsoft accepts octal IP numbers for Ping and FTP. 3. Representation of UTF8 numbers (any start byte is 3nn and any continuation byte 2nn).
  • 32.
    OCTAL NUMBER SYSTEMAPPLICATIONS 4. "Real" real-world use: the Yuki people and in the native Mexican Pamean languages use octal counting because they count the spaces between their fingers 5. Historically in the 1950's, one of the oldest debuggers, UT-3 for the TX-0 computer at MIT (an 18-bit system), could only be operated by using commands written in octal notation.
  • 33.
    6. TAR filesstore some information in octal representation. 7. When fields are naturally divided into three or six bits, octal representation comes in handy . 8. Integers, but also fractions on the Honeywell and other legacy systems were represented as octal. OCTAL NUMBER SYSTEM APPLICATIONS
  • 34.
    9. A wholelot of legacy (CDC machines, DEC PDP-8 etc), because they used multiples of 3 bits, like 6-bit or 12-bit word sizes. 10. In 1971, octal numbers were proposed to replace the decimal system. 11. And finally, most trivially: you use it almost everyday when you write down the number 0 in some programming language that supports octals. OCTAL NUMBER SYSTEM APPLICATIONS
  • 35.
    12. Codes squawkedby Mode 3A transponders in airplanes. 13. Key codes in the ncurses library (ncurses (new curses) is a programming library providing an application programming interface(API) that allows the programmer to write text-based user interfaces in a terminal- independent manner. It is a toolkit for developing … OCTAL NUMBER SYSTEM APPLICATIONS
  • 36.
    "GUI-like" application softwarethat runs under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.) OCTAL NUMBER SYSTEM APPLICATIONS
  • 37.
  • 38.
    HEXA DECIMAL NUMBERSYSTEM Ah, hexadecimal. If you've ever worked with colors in web page design, you've proably seen something like ' or something to that effect. Somehow, that 6 digit hexadecimal number is equal to a lavender or light purple color. What on earth does 'A09CF3' mean? Before we explain that, let's look at what hexadecimal (hex) is.
  • 39.
    HEXA DECIMAL NUMBERSYSTEM Our decimal system, as mentioned in my Binary Tutorial, is a base-10 system, meaning we can count to any number in the universe using only 10 symbols or digits, 0 thru 9. For the computer, a 10- based system probably isn't the most efficient system, so the computer uses binary (in reality, it uses microscopic switches which are either on or off, but we represent them using the digits '1' and '0').
  • 40.
    HEXA DECIMAL NUMBERSYSTEM Unfortunately, binary isn't very efficient for humans, so to sort of find a happy middle ground, programmers came up with hexadecimal. Hexadecimal is a base- 16 number format (hex=6, decimal=10). This means that instead of having only the digits from '0' to '9' to work with like our familiar decimal, or '1' and '0' like binary, we have the digits '0' to '15'.
  • 41.
    HEXA DECIMAL NUMBERSYSTEM It also means that we are using the powers of 16, instead of the powers of 2 like in binary As soon as you count over 9 in hex, new digits take over. A=10, B=11, C=12, D=13, E=14 and F=15.
  • 42.
    HEXA DECIMAL NUMBERSYSTEM 0x0F In fact, the '0x' in front of a hex number is more current than the '$'. The '$' is sort of old school. Whether you use a '$' or a '0x', it tells you that you're working with a hex number, not a decimal
  • 43.
    HEXA DECIMAL NUMBERSYSTEM APPLICATIONS
  • 44.
    HEXA DECIMAL NUMBERSYSTEM APPLICATIONS 1. To define locations in memory. Hexadecimals can characterise every byte as two hexadecimal digits only compared to eight digits when using binary. 2. To define colours on web pages. Each primary colour – red, green and blue is characterised by two hexadecimal digits. The format being used is #RRGGBB. RR stands for red, GG stands for green and BB stands for blue.
  • 45.
    HEXA DECIMAL NUMBERSYSTEM APPLICATIONS 3. To represent Media Access Control (MAC) addresses. MAC addresses consist of 12-digit hexadecimal numbers. The format being used is either MM:MM:MM:SS:SS:SS or MMMM-MMSS- SSSS. The first 6 digits of the MAC address represent the ID of the adapter manufacturer while the last 6 digits represent the serial number of the adapter. 4. To display error messages. Hexadecimals are used to define the memory location of the error. This is useful for programmers in finding and fixing errors.
  • 46.
  • 47.
    The American StandardCode for Information Interchange (ASCII) is a character-encoding scheme originally based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many more characters than ASCII does. ASCII
  • 48.
  • 49.
  • 50.
    ISCII In recent pastthe computer activities were limited to specific languages and with the increase in works there was to be develop a slandered code . In 1991, the bureau of Indian standard develop common code called ISCII. this is a 8-bit code capable of coding 256 characters.
  • 51.
  • 52.
    UNICODE  Unicode providesa unique number for every character,  No matter what the platform  No matter what the program.  No matter what the language. INDIAN LANGUAGES ON UNICODE The standard has incorporated Indian scripts under group name Asian scripts , includes Devnagari , Bengali ,Tamil ,Malayalam.
  • 53.
  • 54.
    CLASS TEST 1. Writea note on ASCII 05 2. Write a note on Unicode 05 3. Convert the following 10 (i) (1111000)2 = (?) 10 (ii) (234)10 = (?)8 (iii) (564)8 = (?)16 (iv) (AA)16 = (?)10 (v) (555)8 = (?)2 Time: 40 Min Max Marks 20
  • 55.