"O GOD THEE I PRAY INCREASE MY KNOWLEDGE DAY BY DAY"

.

For Success

For Success
Know more than other Work more than other But, Expect less than other

Its a necessary and sufficient condition-----

Its a necessary and sufficient condition-----
"If you win, you need not have to explain.........But if you lose, you should not be there to explain!"

07 October 2010

ASCII bcd,EBCDIC

Representation of Characters: ASCII& EBCDIC Code
A decimal number to binary and the coding all have a series of bits. Bits obtained from coding are combinations of 1’s and 0’s arranged according to the rules of used codes. Our computer can understand the instructions written only in ‘0’ or ‘1’ binary code. So, all the digits\character are assigned a specific code in the form of ‘0’ or ‘1’. Different computers and devices need to communicate alphanumeric data amongst themselves. An alphanumeric data consists of only the letters A,B,C,D…,Z,a,b,c,d…..z and the blank spaces and numeric data consists of only numerals,0…9.These representation in form of ‘0’ or ‘1’ codes are divided into some forms of computer codes, some are ASCII-7, ASCII-8, EBCDIC, BCD.



BCD Code (binary code decmal)
Binary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. The binary coded decimal codes are one of the early memory codes. Its main virtue is that it allows easy conversion to decimal digits for printing or display and faster decimal calculations. It is based on the idea of converting each digit of a decimal number into its binary equivalent rather then converting the entire decimal value into a pure binary form.

To Remember:
• The binary coded decimal (BCD) the code is one of the early computer codes.
• This code is based on the idea of converting each digit of a decimal number into its 4 bit binary equivalent. In the BCD form 4 bits each represent all decimal digits. When only 4-bits are used a total of 24 i.e., 16 configurations are possible.
• To represent character- 6 bits are used. It is 6 bit code which allow 64 (2^6) different character.
• BCD number are useful whenever decimal information is transferred into a computer.
• The zone portion is first two bits and digit portion is last four bits
In the 6-bit code the four BCD numeric place position (1,2,4 and 8) are retained, but two additional Zone Positions are used in combination with the numeric bits to represent alphabetic and special positions are used in combination with the bits to represent alphabetic and special characters.
Example:
Conversion of vikram in BCD = 010011 111001 100010 101001 110001 100100
character Zone bits Numeric digits
8 4 2 1
V 0 1 0 0 1 1
I 1 1 1 0 0 1
K 1 0 0 0 1 0
R 1 0 1 0 0 1
A 1 1 0 0 0 1
M 1 0 0 1 0 0

When only 6 bits are used a total of 26 i.e., 64 configurations are possible, means 64 different characters can be represented. These are sufficient to code 10 decimal digits, 26 alphabets and other 28 special characters.

CHARACTER BCD CODE OCTAL EQUIVALENT
Zone Digit
A 11 0001 61
B 11 0010 62
C 11 0011 62
D 11 0100 64
E 11 0101 65
F 11 0110 66
G 11 0111 67
H 11 1000 70
I 11 1001 71

J 10 0001 41
K 10 0010 42
L 10 0011 43
M 10 0100 44
N 10 0101 45
O 10 0110 46
P 10 0111 47
Q 10 1000 50
R 10 1001 51

S 01 0001 22
T 01 0010 23
U 01 0011 24
V 01 0100 25
W 01 0101 26
X 01 0110 27
Y 01 1000 30
Z 01 1001 31

1 00 0001 01
2 00 0010 02
3 00 0011 03
4 00 0100 04
5 00 0101 05
6 00 0110 06
7 00 0111 07
8 00 1000 10
9 00 1001 11
0 00 0000 12

Example: Conversion of
“NEEL007” BCD = 100101 110101 110101 100011 001010 001010 000111

character Zone bits Numeric digits
8 4 2 1
N 1 0 0 1 0 1
E 1 1 0 1 0 1
E 1 1 0 1 0 1
L 1 0 0 0 1 1
0 0 0 1 0 1 0
0 0 0 1 0 1 0
7 0 0 0 1 1 1

Conversion of Rahul in BCD = 010011 111001 100010 101001 110001 100100
character Zone bits Numeric digits

1001
0001
1000
0100
0011
R
10
11
11
01
10
A

H

U

L

Zone code - Digit code, zone code - Digit code
101001110001111000010100100011

Drawbacks of BCD :
Its drawbacks are the increased complexity of circuits needed to implement mathematical operations and a relatively inefficient encoding.
It occupies more space than a pure binary representation
By this code only 64 characters can be represented, which are not sufficient.to provide for decimal numbers(10), lower cse letters(26), capital letters(26) and other special characters.
Pracitce:
Prove these:
CASE = 110111 110001 010001 010010 110101
Manisha = 100100 110001 100101 111001 010001 111000 110001
Practice: Change these in BCD
1. manisha
2. nirbhay99
3. lavanya36
4. engineertamra1789
5. singhbikaner

Packed BCD
A widely used variation of the two-digits-per-byte encoding is called packed BCD or simply packed decimal. All of the upper bytes of a multi-byte word plus the upper four bits (nibble) of the lowest byte are used to store decimal integers. The lower four bits of the lowest byte are used as the sign flag.
As an example, a 32 bit word contains 4 bytes or 8 nibbles. Packed BCD uses the upper 7 nibbles to store the integers of a decimal value and uses the lowest nibble to indicate the sign of those integers.
Sign
Digit BCD
8 4 2 1 Sign Notes
A 1 0 1 0 +
B 1 0 1 1 −
C 1 1 0 0 + Preferred
D 1 1 0 1 − Preferred
E 1 1 1 0 +


ASCII Code
American Standard Code For Information Interchange.
It is the most common encoding for characters. It is a way of how the characters should map to various numbers. In today’s scenario everyone uses this coding. It is built in binary code for representing characters in almost computers. But in IBM mainframe use the EBCDIC code system. Initially it was based on 7-bit coding system.
In data communication x6x5…….x0 is 2^7=128 character.
It is seven bit code system and is divided into two portion.
(1) Zone portion – x6x5x4
(2) Digit portion - x3x2x1
ASCII was originally developed for communications and uses only seven bit per character, providing 128 combinations that include upper & lower case alphabetic letters, the numeric digit and special symbols such as the $ and %.
ASCII reserves the first 32 codes (numbers 0–31 decimal) for control characters: codes originally intended not to carry printable information, but rather to control devices (such as printers) that make use of ASCII, or to provide meta-information about data streams such as those stored on magnetic tape. The original ASCII standard used only short descriptive phrases for each control character. The ambiguity this left was sometimes intentional (where a character would be used slightly differently on a terminal link than on a data stream) and sometimes more accidental (such as what "delete" means).
The standard ASCII table defines 128 character codes (from 0 to 127), of which, the first 32 are control codes (non-printable), and the remaining 96 character codes are representable characters:
* 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 NUL SOH STX ETX EOT ENQ ACK BEL BS TAB LF VT FF CR SO SI
1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US
2 ! " # $ % & ' ( ) * + , - . /
3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4 @ A B C D E F G H I J K L M N O
5 P Q R S T U V W X Y Z [ \ ] ^ _
6 ` A b c d e f g h i j k l m n o
7 p Q r s t u v w x y z { | } ~

* This panel is organized to be easily read in hexadecimal: row numbers represent the first digit and the column numbers represent the second one. For example, the "A" character is located at the 4th row and the 1st column, for that it would be represented in hexadecimal as 0x41 (65).
Because most systems nowadays work with 8bit bytes, which can represent 256 different values, in addition to the 128 standard ASCII codes there are other 128 that are known as extended ASCII, which are platform- and locale-dependent. So there is more than one extended ASCII character set.
TYPES-
ASCII is of two types :
1. ASCII-7
2. ASCII-8
ASCII-7
ASCII-7 is a 7-bit code that allows 128 different characetrs. The first 3 bits are used as zone bits and the last 4 bits indicate the digit. Micorcomputers using 8-bit byte use the 7-bit ASCII by leaving the leftmost first bit of each byte as a zero. ASCII-7 is a 7 bit code ,which allow 128 (2^7) different characters.
The first 3 bits are used as zone bits.
The last 4 bits indicate the digit.
Microcomputer using 8 bit byte (group of 8 bit for 1byte) use the 7 bit ASCII by leaving the left most first bit of each byte as a zero.

Table of ASCII-7
Character Ascii -7 Hexadecimal Equivalent
zone digit
code code
0 011 0000 30
1 011 0001 31
2 011 0010 32
3 011 0011 33
4 011 0100 34
5 011 0101 35
6 011 0110 36
7 011 0111 37
8 011 1000 38
9 011 1001 39

A 100 0001 41
B 100 0010 42
C 100 0011 43
D 100 0100 44
E 100 0101 45
F 100 0110 46
G 100 0111 47
H 100 1000 48
I 100 1001 49
J 100 1010 4A
K 100 1011 4B
L 100 1100 4C
M 100 1101 4D
N 100 1110 4E
O 100 1111 4F

P 101 0000 50
Q 101 0001 51
R 101 0010 52
S 101 0011 53
T 101 0100 54
U 101 0101 55
V 101 0110 56
W 101 0111 57
X 101 1000 58
Y 101 1001 59
Z 101 1010 5A




Example:
Conversion of vikram in ASCII-7 = 1010110 1001001 1001011 1010010 1000001 1001101
character Zone code Digit code
V 101 0110
I 100 1001
K 100 1011
R 101 0010
A 100 0001
M 100 1101

Example: Conversion of
“NEEL007” in ASCII-7 = 1001110 1000101 1000101 1001100 0110000 0110000 0110111


character Zone code Digit code
N 100 1110
E 100 0101
E 100 0101
L 100 1100
0 011 0000
0 011 0000
7 011 0111



Example : Change RAVI in ascii-7

Character ZONE CODE DIGIT CODE
R 101 0010
A 100 0001
V 101 0110
I 100 1001

Zone code - Digitcode,zonecode - Digit code
1010010100000110101101001001

Practice: Change these in asii-7
1. manisha
2. nirbhay99
3. lavanya36
4. engineertamra1789

Ascii-8
ASCII-8 is an extended version of ASCII-7.
• It is an 8 bit code ,which allow 256 (2^8) different characters, rather than 128 in ascii-7.
• The additional bit is added to the zone bits.
• The first 4 bits are used as zone bits.
• The last 4 bits indicate the digit.

Ascii-8 table:


Character Zone code Digit code Hexadecimal
Equivalent
0 0101 0000 50
1 0101 0001 51
2 0101 0010 52
3 0101 0011 53
4 0101 0100 54
5 0101 0101 55
6 0101 0110 56
7 0101 0111 57
8 0101 1000 58
9 0101 1001 59

A 1010 0001 A1
B 1010 0010 A2
C 1010 0011 A3
D 1010 0100 A4
E 1010 0101 A5
F 1010 0110 A6
G 1010 0111 A7
H 1010 1000 A8
I 1010 1001 A9
J 1010 1010 AA
K 1010 1011 AB
L 1010 1100 AC
M 1010 1101 AD
N 1010 1110 AE
O 1010 1111 AF

P 1011 0000 B0
Q 1011 0001 B1
R 1011 0010 B2
S 1011 0011 B3
T 1011 0100 B4
U 1011 0101 B5
V 1011 0110 B6
W 1011 0111 B7
X 1011 1000 B8
Y 1011 1001 B9
Z 1011 1010 BA

Example:

Character ZONE CODE DIGIT CODE
R 1011 0010
A 1010 0001
J 1010 1010
D 1010 0100
E 1010 0101
E 1010 0101
P 1011 0000

Zone code - Digitcode,zonecode - Digit code
10110010101000011010101010100100101001011010010110110000

Practice: Change these in asii-8
6. manisha
7. nirbhay99
8. lavanya36
9. engineertamra1789
10. singhbikaner




EBCDIC Code

EBCDIC (Extended Binary Coded Decimal Interchange Code) is a character encoding set used by IBM mainframes. Unlike virtually every computer system in the world which uses a variant of ASCII, IBM mainframes and midrange systems such as the AS/400 tend to use a wholly incompatible character set primarily designed for ease of use on punched cards.
The character encoding is based on Binary Coded Decimal (BCD), so the contiguous characters in the alphanumeric range are formed up in blocks of up to 10 from 0000 binary to 1001 binary. Non alphanumeric characters are almost all outside the BCD range. EBCDIC uses the full 8 bits available to it, so parity checking cannot be used on an 8 bit system. Also, EBCDIC has a wider range of control characters than ASCII.
To be remember:
• Extended Binary Coded Decimal Interchange Code, pronounced “eb-see-dick”.
• EBCDIC is an 8 bit code, it can be easily divided into two 4 bit group. Each of these 4-bit groups can be represented by 1 hexadecimal digit
• In this code, it is possible to represent 256(28) different characters instead of 64(26). Because EBCDIC is an 8-bit code,.
• The binary code for text as well as communication & printer control for IBM.
• This code can represent the following type of coded information.

2.) Lowercase letters – a,b,c….z
3.) Upper case letter eg. A,B, …Z
4.) Printable
5.) Nom printable
6.) Numeric values 0,1,….9
7.) Some special character such ass +,-,*,/,$ etc
In the BCd code only 64 characters can be represented, which are not sufficient to provide decimal number (10), lower case letter (26), capital letters (26) and large number of other special characetrs. Hence, the BCD code was extended from a 6-bit code to an 8-bit code. This coding scheme is called as EBCDIB for Extended bimary coded decimal interchange code.



Character EBCDIC CODE HEXADECIMAL EQUIVALENT
Zone code Digit code
A 1100 0001 C1
B 1100 0010 C2
C 1100 0011 C3
D 1100 0100 C4
E 1100 0101 C5
F 1100 0110 C6
G 1100 0111 C7
H 1100 1000 C8
I 1100 1001 C9

J 1101 0001 D1
K 1101 0010 D2
L 1101 0011 D3
M 1101 0100 D4
N 1101 0101 D5
O 1101 0110 D6
P 1101 0111 D7
Q 1101 1000 D8
R 1101 1001 D9

S 1111 0001 E2
T 1111 0010 E3
U 1111 0011 E4
V 1111 0100 E5
W 1111 0101 E6
X 1111 0110 E7
Y 1111 1000 E8
Z 01 1001 E9

1 1111 0001 F1
2 1111 0010 F2
3 1111 0011 F3
4 1111 0100 F4
5 1111 0101 F5
6 1111 0110 F6
7 1111 0111 F7
8 1111 1000 F8
9 1111 1001 F9
0 1111 1010 F0

Example:

Character ZONE CODE DIGIT CODE
R 1101 1001
A 1100 0001
J 1101 0001
Zone code - Digitcode,zonecode - Digit code
11011001 11000001 11010001


Advantages
• Scaling by a factor of 10 (or a power of 10) is simple; this is useful when a decimal scaling factor is needed to represent a non-integer quantity (e.g., in financial calculations)
• Alignment of two decimal numbers (for example 1.3 + 27.08) is a simple, exact, shift
• Rounding at a decimal digit boundary is simpler.
• Conversion to a character form or for display is a simple per-digit mapping, and can be done in linear time. A text-based format such as XML, or to drive signals for a seven-segment display. Conversion from pure binary involves relatively complex logic that spans digits, and for large numbers no linear-time conversion algorithm is known
• Some non-integral values, such as 0.3, have a finite place-value representation in decimal but not in binary; consequently a system based on binary place-value representations would introduce a small error representing such a value, which may be compounded by further computation if careful numerical considerations are not made.
Note that if computation is not performed on the value this is not an issue, since it suffices to represent it using enough bits that when rounded to the original number of decimal digits the original value is correctly recovered.
Disadvantages
Some operations are more complex to implement.
• Adders require extra logic to cause them to wrap and generate a carry early. 15–20% more circuitry is needed for BCD add compared to pure binary. Multiplication requires the use of algorithms that are somewhat more complex than shift-mask-add
Exam: a binary multiplication, requiring binary shifts and adds or the equivalent, per-digit or group of digits is required
• Standard BCD requires four bits per digit, roughly 20% more space than a binary encoding. When packed so that three digits are encoded in ten bits, the storage overhead is reduced to about 0.34%, at the expense of an encoding that is unaligned with the 8-bit byte boundaries common on existing hardware, resulting in slower implementations on these systems.
Practical existing implementations of BCD are typically slower than operations on binary representations, especially on embedded systems, due to limited processor support for native BCD operations.

Practice: Change these in EBCDIC
1. manisha
2. nirbhay99
3. lavanya36
4. engineertamra1789
5. singhbikaner

• An Indian Code

ISCII –Coding representation:
Indian Standard code for Information Interchange-
• This coding is an Indian information interchange. It is developed for representation of Indian script alphabets.
• It is 8-bit representation
• It also allows English vowels and consonants and other symbols.
• It is based on BRAMHI script.
USE:
• Mainly it is developed for our traditional religious books

big airthmetic operation

Airthmetic operations -Addition and subtraction
A simple method to add floating-point numbers is to first represent them with the same exponent. In the example below, the second number is shifted right by three digits, and we then proceed with the usual addition method:
123456.7 = 1.234567 * 10^5
101.7654 = 1.017654 * 10^2 = 0.001017654 * 10^5

Hence:
123456.7 + 101.7654 = (1.234567 * 10^5) + (1.017654 * 10^2)
= (1.234567 * 10^5) + (0.001017654 * 10^5)
= (1.234567 + 0.001017654) * 10^5
= 1.235584654 * 10^5
In detail:
e=5; s=1.234567 (123456.7)
+ e=2; s=1.017654 (101.7654)

e=5; s=1.234567
+ e=5; s=0.001017654 (after shifting)
--------------------
e=5; s=1.235584654 (true sum: 123558.4654)
This is the true result, the exact sum of the operands. It will be rounded to seven digits and then normalized if necessary. The final result is
e=5; s=1.235585 (final sum: 123558.5)
Note that the low 3 digits of the second operand (654) are essentially lost. This is round-off error. In extreme cases, the sum of two non-zero numbers may be equal to one of them:
e=5; s=1.234567
+ e=-3; s=9.876543

e=5; s=1.234567
+ e=5; s=0.00000009876543 (after shifting)
----------------------
e=5; s=1.23456709876543 (true sum)
e=5; s=1.234567 (after rounding/normalization)
Another problem of loss of significance occurs when two close numbers are subtracted. In the following example e = 5; s = 1.234571 and e = 5; s = 1.234567 are representations of the rationals 123457.1467 and 123456.659.
e=5; s=1.234571
- e=5; s=1.234567
----------------
e=5; s=0.000004
e=-1; s=4.000000 (after rounding/normalization)
The best representation of this difference is e = −1; s = 4.877000, which differs more than 20% from e = −1; s = 4.000000. In extreme cases, the final result may be zero even though an exact calculation may be several million. This cancellation illustrates the danger in assuming that all of the digits of a computed result are meaningful. Dealing with the consequences of these errors is a topic in numerical analysis; see also Accuracy problems.
Example: Add 0.1101E02 and 0.1001E05 Step:1 Equalize the exponent—0.1101E02 = 0.0001E05
Step.2 0.0001E05 . . .. …. 0.1001E05 …… 0.1002E05 -- Answer
Ex Example: Add 0.6532E99 and 0.5834E99 Step:1 Equalize the exponent—both exponent’s value are same
Step.2 0.6532E99 . . .. …. 0.5834E99 …… 1.2366E99 = 0.1236E100 = 001.236E99 - overflow condition exponent . . cannot store more than 2 digit
Example: Subtract 0.1101E02 from 0.1001E05 Step:1 Equalize the exponent—0.1101E02 = 0.0001E05
Step.2 0.1001E05 . . .. …. 0.0001E05 …… 0.1000E05---Answer
Ex Example: Subtract 0.6943E-99 from 0.7792E-99 Step:1 Equalize the exponent—both exponent’s value are same
Step.2 0.7792E-99 . . .. …. 0.6943E-99 …… 0.0849E-99 = 0.849E-100 = - underflow condition- exponent .. cannot store more than 2 digit
Multiplication
To multiply, the significands are multiplied while the exponents are added, and the result is rounded and normalized.
e=3; s=4.734612
× e=5; s=5.417242
-----------------------
e=8; s=25.648538980104 (true product)
e=8; s=25.64854 (after rounding)
e=9; s=2.564854 (after normalization)
Ex Example: Multiply 0.1328E03 from 0.6452E10 Step:1 multiply the mantissa----------0.1328 * 0.6452 = 0.08568256
Step.2 multiply the exponent-----E03*E10 =E 13
So answer is -0.8568E13
Ex Example: Multiply 0.7832E54 from 0.2316E51 Step:1 multiply the mantissa----------0.7832 * 0.2316 = 0.181389
Step.2 multiply the exponent-----E54*E51 =E 105
So answer is -0.181389E105-----------Overflow condition- exponent .. cannot store more than 2 digit

Division is done similarly, but is more complicated.
Ex Example: Divide 0.1620E05 by 0.1300E03 Step:1 Shift the dividend to the sufficient number of places to make the mantissa of dividend smaller then the mantissa of divisor-------0.1620 > 0.1300 So 0 .1620E05= 0.0162E06
Step.2 Divide .01620 / 0.1300= 0.1246, reminder = 200
Step-3 subtract the exponent-----E06 - E03 =E03
So answer is-- -0.1246E03
Ex Example: Divide 0.1234E99 by 0.1100E013 Step:1 Shift the dividend to the sufficient number of places to make the mantissa of dividend smaller then the mantissa of divisor-------0.1234 > 0.1100 So 0 .1234E99= 0.0123E100
Step.2 Divide .01230 / 0.1100= 0.1118
Step-3 subtract the exponent-----E100 - E01 =E99
So answer is-- -0.1118E99

There are no cancellation or absorption problems with multiplication or division, though small errors may accumulate as operations are performed repeatedly. In practice, the way these operations are carried out in digital logic can be quite complex (see Booth's multiplication algorithm and digital division). For a fast, simple method, see the Horner method.

complements

Complements

The complement of a number is a number which when added to the original will make it equal to a multiple of the base of the number system.

Generally the base is represented by ‘r’. so we cancategorized complement in the term of ‘r’
1. r’s complement
2. (r-1)’s complement
General complement table of normally used bases:
No.System ‘r’ r’s complement
(r-1)’s complement

Binary 2 2’s complement
1’s complement

Octal 8 8’s complement
7’s complement

Decimal 10 10’s complement
9’s complement

Hexadecimal 16 16’s complement
15’s complement


Rules:
• Farmula for r’s complement: rn -N
r = base
N = given +ve number
n = the number of digits in the integer part of N

• Farmula for (r-1)’s complement: rn – r -m - N
m = the number of digits in the fractional part
Example: Find 10’s complement of (1789)10
Sol: here r = 10 , n = 4 , N = (1789)10
= rn –N = (104)10 -(1789)10
= 10000 – 01789 = (8211)10

Example: Find r’s complement of (998)16
Sol: here r = 16 , n = 3 , N = (998)16
= rn –N = (163)10 -(998)16
= (4096)10 -(998)16
= (1000)16 -(998)16 = (0002)16
Example: Find 9’s complement of (1789)10
Sol: here r = 10 , m=0, n = 4 , N = (1789)10
= : rn – r -m - N = ( rn – r 0 )- N = (rn – 1)10 – N
=( 104-1 )10 -(1789)10
= 10000 –1- 01789 = (8210)10

Note: If there is no fractional value then the farmula= (rn – 1)10 – N

Example: Find ( r-1)’s complement of (111.10)10
Sol: here r = 2 , n = 3 ,m = 2, N = (111.10)16
= rn – r -m - N = ( 23 – 2 -2 )^10 - N = (8 – .25)10 – N = (7.75)10 -(111.10)2
= (111.11)2 -(111.10)2
= (000.01)2


Signed numbers:
Sign Complement form -----*1’s complement * 2’s complement form
Sign magnitude form
Ones' complement
In ones' complement, the inverse of a number is formed by complementing each bit — that is, performing a bitwise NOT operation. For example:
0101 = +5
1010 = -5
A side effect of both this and the previous system, one of the reasons these systems are not often used for computing, is that there are two representations for zero. In ones' complement:
0000 = +0
1111 = -0
In sign-magnitude:
0000 = +0
1000 = -0

Rules for 1’s COMPLEMENT of a binary number
Under this method first we have to find out the given number’s sign
1. I f the number is +ve, then the binary equivalent is the complement
2. If the number is –ve, then ,
Step 1 – change in binary equivalent
Step- 2 - REPLACE 0 BY 1 AND 1 BY 0
Ex. (+77)10
Step:1-------Binary equivalent of 77 = (1001101)2
Step:2-------It’s 1’s Complement = 1001101
Step:--------Given number’s sign is +ve , so the answer: 1001101
Note: If the answer is required in 16 bit buffer then the answer is 0000000001001101

Ex. (-77)10
Step:1-------Binary equivalent of 77 = (1001101)2
Step:2-------Sign is –ve so, It’s 1’s Complement = 0110010

Note: If the answer is required in 16 bit buffer then the answer is 1111111110110010

2’s COMPLEMENT
Two's complement is the most widely used system in modern computing. To form the two's complement, take the bitwise NOT of the number and add 1. For example:
0101 = +5
1011 = -5
Thus:
0000 = decimal 0 1000 = decimal -8
0001 = decimal 1 1001 = decimal -7
0010 = decimal 2 1010 = decimal -6
0011 = decimal 3 1011 = decimal -5
0100 = decimal 4 1100 = decimal -4
0101 = decimal 5 1101 = decimal -3
0110 = decimal 6 1110 = decimal -2
0111 = decimal 7 1111 = decimal -1
Using this system, 16 bits will encode numbers from −32,768 to 32,767, while 32 bits will encode −2,147,483,648 to 2,147,483,647.
The great advantage of the two's complement system is that most operations are not dependent on the sign of the operands and furthermore are identical to operations on unsigned binary integers.
For instance, 5 + (-5) would be performed like this:
0101
+1011
10000
However, seeing as we have taken the numbers as 4 bits long, the leading 1 is discarded and we have the expected result of 0.
The fact that most operations work no matter the sign of the operands can be explained through the duplicity of numbers modulo 2n; e.g. 15 ≡ -1 (mod 16). Computers generally use a fixed number of bits for binary numbers and thus such a system is ideal. Essentially the only difference between two's complement numbers and unsigned numbers is how they are displayed and compared.
One quirk of two's complement is that the lowest encodable number (e.g. -32768 for 16 bit numbers) appears to be its own negative. However, this rarely causes problems.
As a number composed entirely of 1s (such as 11111111) equates to -1 in two's complement notation, many programming languages use -1 for true and 0 for false.
Rules for 2’s COMPLEMENT of a binary number

Under this method first we have to find out the given number’s sign
3. I f the number is +ve, then the binary equivalent is the complement
4. If the number is –ve, then ,
Step 1 – change in binary equivalent
Step- 2 – find the complement by replacing 0 by 1 and 1 by 0
Step-3- add 1 In step one’s result

Ex. (+77)10
Step:1-------Binary equivalent of 77 = (1001101)2
Step:2-------It’s 1’s Complement = 1001101 = It’s 2’s Complement
Step:3--------Given number’s sign is +ve , so the answer: 1001101
Note: If the answer is required in 16 bit buffer then the answer is 0000000001001101

Ex. (-77)10
Step:1-------Binary equivalent of 77 = (1001101)2
Step:2-------Sign is –ve so, It’s Conversion = 0110010
Step-3: ----- 0110010 + 000001 = 0110011
It’s 2’s Complement = 0110011
Note: If the answer is required in 16 bit buffer then the answer is 1111111110110011

Practice: change these decimal numbers in binary one’s complement & 2’s complement & compare them—99, 1786 ,786

binary airthmetic

BINARY ARITHMETIC

The binary numeral system or base 2 number system is numeral system that represents numeric values using two symbols usually 0 and 1. More specifically, the usual base 2 system is a positional notation with a radix of 2. Owing to its straight forward implementation digital electronic circuitry using logic gates, the binary system is used internally by all modern computers.
A binary number can be represented by any sequence of bits (binary digits) which in turn may be represented by any mechanism capable of being in two mutually exclusive states.

The following sequence of symbols could all be interpreted as the same binary numeric values of 667.

1 0 1 0 0 1 1 0 1 1
x o x o o x x o x x
y n y n n y y n y y

the usual arithmetic taught in school uses the decimal number system. A number such as 394 [three hundred ninety four] is called a decimal number.

394 = 3 x 100 + 9 x 10 + 4 x 1
= 3 x 102 + 9 x 101 + 4 x 100

The number is also said to be written in base 10. the position of the digits in a particular number indicates the magnitude of the quantity represented and can be assigned a weight.

Binary digits also follow some rules and regulation for arithmetic operations as like as decimal numbers . in this chapter we will discuss these operations:








ADDITON :-
Binary addition is carried out in the same way as decimal addition. The rules for four possible additions of two binary numbers A and B and their results are given in table below:

A B Sum
0 + 0 0
0 + 1 1
1 + 0 1
1 + 1 10

The last addition viz. 1+1 = 10 may be understood clearly. This is so written because the largest digit in the binary system is 1. the result of the sum greater than 1 will require that a digit be carried over. Hence, the last addition, in fact, implies that 1+1 = 0 plus a carry of 1 to the next right column. Thus for further addition, the above table may be rewritten as follows:-



A B Sum Carry
0 + 0 0 0
0 + 1 1 0
1 + 0 1 0
1 + 1 0 1
1+1+1 1 1

For addition of 3 or more bits, two bits are added at a time and the above rules are repeated for further additions



E X . Add 10111111 and 11111101


carry 1111111
10111111
+ 11111101
Ans: 110111100

Practice: add these
1. 101+111
2. 1111+1011
3. 1010101+1111000
4. 110101+10001
5. 10111111+11111111
Answers:
1.1100, 2. 11010, 3. 11001101, 4. 1000110, 5. 110111110

SUBTRACTION:
As like as decimal system binary subtraction is same.
Subtrahend- S-number to be subtracted
Minuend- M- number from which other number subtracted
In this operation we have to check which is greater –subtrahend or minuend
If M > S, then subtraction is performed.
If S > M, then borrow is required from left column- In decimal borrower is 10 , but in binary borrower is 2

RULES :-

A B Subtraction
0 - 0 0
0 - 1 1 ( with a borrow of 1)
1 - 0 1
1 - 1 0


Ex. Subtract 1101 from 10011

BORROW 012
10011
- 01101
Ans: 00110




BORROW 012
10101001
- 10011111
Ans: 00001010

Practice & check :
1. 110101-10001=100100
2. 1010101-101001=101100
3. 10011-01111=00100


Additive method of Subtraction/ Complementary subtraction:

Rules & regulation for this:
1. Find the complement of Subtrahend
2. Then, Complement of S + Minuend
Now there can be two conditions occurs:
If no carry- then find the recomplement of the sum( previous result)- & attach a –ve sign with the result
If a carry comes then add it to obtained result

Example: Subtract 10011111 from 10101001 using addative approach
Step-1 complement of 10011111= 01100000
Step-2 10101001
+01100000
00001001
Carry + 1
Result 00001010

Example: Subtract 1000 from 0101
Step:1 Complemnet of 1000 is 0111
Step:2 0101
0111
+1100- With no carry
Step 3 complement of 1100 is 0011
Result is = - 0011


MULTIPLICATION

RULES :- There are only 4 conditions.
s
A B Multiplication
0 * 0 0
0 * 1 0
1 * 0 0
1 * 1 1
Ex.
1110
x 1011
——————
1110
1110x
0000xx
1110xxx
—————
10011010
—————

Practice:
Multiply these and prove it
1110*1011= 10011010
11101*1100 =101011100

Additive method of multiplication:
This approach is simpler but very lengthy. Mostly computers use this approach due to their high speed to perform operations.



DIVISION

RULES :-
there only two conditions.
0/1=0
1/1=1
• compare divisor with dividend.
• If , dividend > divisor
Then, take value of quotient 1 and subtract the divisor from the corresponding digits of dividend.
If , Divisor > Dividend
Then, take value of the quotient 0 and repeat whole process till sufficient digits in dividend
Exmple: Divide a binary digit 1010 by binary 10

Divisor Dividend quotient
10 1010 101
10
0010
10
0000 –Reminder
Exmple: Divide a binary digit 1100111 by binary 111

Divisor Dividend quotient
111 1100111 01110
111
1011
111
1001
111
101 --Reminder


Additive method:
Example: Divide 10001 by 110
10001 - 110 = 01011 1
1011 – 110 = 0101 – reminder 1
Quotient 10

number system for my first semester students

Commonly used Number systems are:-
(A) Decimal number system
(B) Binary number system
(C) Octal number system
(D) Hexa-decimal number system


Number System Available Digits Base Value
Decimal 0,1,2,3,4,5,6,7,8,9 10
Binary 0,1 2
Octal 0,1,2,3,4,5,6,7 8
Hexa-Decimal 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F 16
In any number system digits are arranged in order of ascending value, moving from the lowest on the right to the highest on the left. That’s why the leftmost digit is referred to as the most significant and the rightmost as the least significant digit. As shown:

Most significant (MSB) Least significant (LSB)

X8 X7 X6 X5 X4 X3 X2 X1 X0

 Decimal Number System: -

It is most common number system, which is used usually. It contains 10 different digits, 0 to 9. In the decimal system, each weight equals 10 raised to the power of its position. The weight of its first position, is 100,which equals 1. So, the value of a digit in the first position is equal to the value of the digit times 1. The weight of the second position is 101 ,which equal to 10. The value of a digit in the second position, therefore, is equal to the value of the digit times 10, and so.

Position Forth Third Second First
Weight 103 (1000) 102(100) 101(10) 10(1)


EXAMPLE:
Show the weighting of the decimal number 1789:

1 7 8 9 Digit
103 102 101 100
 Weight
1000 100 10 1

1000 700 80 9

Value Of 1789 = 9*100+8*101 +7*102+1*103 = 9*1+8*10+7*100+1*1000 = 9+80+700+1000
Practice Exercise : 998, 6300, 786


Position Fifth Fourth Third Second First
Weight 24(16) 23(8) 22(4) 21(2) 20(1)

EXAMPLE:

1 0 0 1 Digit
8 4 2 1 Weight
(23) (22) (21) (20)

1*23 0*22 0*21 1*20

Value = 8+0+0+1= (9) 10
The value of the binary number can be computed using defined farmula.
(10101)2== 1*20+0*21 +1*22+0*23+1*24= 1*1+0*2+1*4+0*8+1*16 =1+0+4+0+16 = (21)10

 Octal Number System: -
Computer programmers to represent binary number in a compact form use it. The octal system uses eight symbols, 0 to 7. In this weight 8 is raised to the power is represented by a position.

Position Fifth Fourth Third Second First
Weight 84(4096) 83(512) 82(64) 81(8) 80(1)

Relation between Binary & Octal Number System
Decimal Number Octal Number Binary Number
0 0 000
1 1 001
2 2 010
3 3 011
4 4 100
5 5 101
6 6 110
7 7 111

To calculate the value of a number, we multiply each digit or symbol by the weight due to its position and then we add the results.

EXAMPLE: 2211with octal base
2 2 1 1 =>Digit
(83) (82) (81) (80)

512 64 8 1 =>Weight due to position

2*512 2*64 1*8 1*1
Value = 1024+128+8+1 = (1161)10

 Hexadecimal Number System: -

Hexa–decimal number system use 16 different symbols to represent data. The permitted digits (symbols) in this system are: -0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Hexa-decimal number system is used extensively in modern digital computers these days. It is convenient and simple to represent large binary numbers into smaller Hexa-decimal format. Hence for convenience in representing large or complex numbers, the hexa-decimal numbers are used.

Relation between Binary & Hexa-Decimal Number System
Decimal Number Hexa-Decimal Number Binary Number
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111

Here weight is 16 raised to power represented by a position as:


Position Fourth Third Second First
Weight 163(4096) 162(256) 161(16) 160(1)


To calculate the value of a number, we multiply each digit of symbol by weight due to its position and then we add the results.
EXAMPLE:
4 4 4 4 =>Digit
(163) (162) (161) (160)

4096 256 16 1 =>Weight

4*4096 4*256 4*16 4*1
Value = 16384+1024+64+4 = (17476)10


CONVERSION FROM ONE NUMBER SYSTEM TO ANOTHER-
In this chapter we are going to discuss these conversions with rules –regulations and their corresponding examples:

A….CONVERTING TO DECIMAL FROM ANOTHER BASE

B…CONVERTING FROM DECIMAL TO A NEW BASE

C…CONVERTING FROM A BASE OTHER THEN 10 TO A BASE OTHER THAN 10
D… CONVERSION FOR FRACTIONAL NUMBERS
• OTHER BASE TO DECIMAL

• DECIMAL TO OTHER BASE



A…CONVERTING TO DECIMAL FROM ANOHER BASE

Rules &Regulation:

TO CONVERT A NO. IN DECIMAL MULTIPLY EACH DIGIT WITH THEIR POSITIONAL VALUE AND ADD THEM.

Example:…………

(10101)2 = (?)10

=1*20+0*21+1*22+0*23+1*24
=1*1+0*2+1*4+0*8+1*16
=1+0+4+0+16
=(21) 10
Another method:
(10101)2 = (?)10
=1*24+0*23+1*22+0*21+1*20
=(16 X 1)+(0 X 8)+(4 X 1)+(2 X 0)+(1 X 1)
=16+0+4+0+1
=(21) 10

(7011)8 =(?)10
=(7 X 512)+(0 X 64)+(1 X 8)+(1 X 1)
=3584+0+8+1
=(3593) 10

(BF1) 16=(?)10
=(B X 256)+(F X 16)+(1 X 1)
=(11 X 256)+(15 X 16)+(1 X 1)
=(3057) 10

For Practice:
1. Change theses binary numbers in decimal- 11, 10101,1101011
2. Change theses Octal numbers in decimal – 123, 2345, 4567, 567
3. Change theses Hesadecimal numbers in decimal- ABCD, 99DE, CA998
Prove these:
1. 101001 in binary = 41 in decimal
2. 7012 in octal = 3594 in decimal
3. 312 in base 4 = 54 in decimal
4. BFA in hexadecimal = 3313 in decimal
5. A1A in base 12 = 1462 in decimal

B…CONVERTING FROM DECIMAL TO A NEW BASE

Rules &Regulation:

1. DIVIDE THE DECIMAL NO. BY NEW BASE
2. RECORD THE REMAINDER
3. DIVIDE THE QUOTIENT OF STEP 1
4. RECORD THE REMAINDER FROM STEP 3
5. REPEAT STEP 3 & 4 UNTIL THE QUOTIENT BECOMES 0
6. ARRANGE THE REMAINDERS IN REVERSE ORDER



Example:

1. Find (36)10 =(?)2

DIVISION QUOTIENT REMAINDER
36/2 18 0
18/2 9 0
9/2 4 1
4/2 2 0
2/2 1 0
1/2 0 1

THE REMAINDER HAS TO BE ARANGED IN REVERSE ORDER*

= (100100)2
Check it- 0*1+0*2+1*4+0*8+0*16+1*32 =0+0+4+0+0+32 =36 in decimal




• 2. Find (1789) 10 =(?)8

DIVISION QUOTIENT REMAINDER
1789/8 223 5
223/8 27 7
27/8 3 3
3/8 0 3

=(3375) 8

Check it:
3375 in octal = 5*1+7*8+3*64+3*512 =5+56+192+1536 =1789 in decimal

• 3. Find (623) 10 = ?16

DIVISION QUOTIENT REMAINDER
623/16 38 15 (F)
38/16 2 6
2/16 0 2
= (26F) 16
4. Find (998)10 =(?)16

DIVISION QUOTIENT REMAINDER
998/16 62 6
62/16 3 14 (E)
3/16 0 3

THE REMAINDER HAS TO BE ARANGED IN REVERSE ORDER*

= (3E6) in hexadecimal

Check it- 6*1+14*16+3*256 = 6+224+768 = 998 in decimal

• Integer with fractional part ( Decimal to Binary)
Rules:
1. We multiply given fractional part by 2 and note the result in separate column.
2. The successive fractional parts of the previous result are multiplied by 2 till the fractional part of the product become 0 or up to the accuracy.
3. The integer part of the product is written in downward direction to find the binary equivalent of the decimal fraction.
Example;
Change a decimal number 0.68 in binary equivalent?
Process Product decimal part integer part
0.68*2 1.36 .36 1
0.36*2 0.72 .72 0
0.72*2 1.44 .44 1
0.44*2 0.88 .88 0
0.88*2 1.76 .76 1

So, 0.68 in decimal = 0.10101 in binary
Practice:
Prove these:
1. 247 in decimal = 187 in base 12
2. 47 in decimal = 142 in base 5
3. 101.07 in decimal = 1100101.00010 in binary
4. 75.68 in decimal = 1001011.10101
Find these:
5. change decimal 786 in base 2, 8, 16, 5, 12, 6 and check yourself




C…CONVERTING FROM A BASE OTHER THEN 10 TO A BASE OTHER THAN 10

There are two methods to solve this type of problem

Indirect Method: for this conversion we follow this rule
TO CHANGE A BASE OTHER THEN 10 TO A BASE OTHER THEN 10 WE HAVE TO CONVERT THE GIVEN NO. INTO DECIMAL AND THEN TO REQUIRED BASE.
Direct Method: for this conversion we follow this rule
In this method we follow the relationship table(binary-octal-hexadeciaml-decimal) and convert the given digit into required base digit.
1. Binary to Octal:
Prepare the binary digit in three three’s pairs. If leftmost group pair has fewer bits then attach required number of leading 0 to become pairs of three. After preparing pairs calculate one octal digit for each group or check the value of binary in octal from the relationship table.
Example: Find 10110011in binary to octal?
10110011 = 010 110 011
010 in binary = 0*1+1*2+0*4 = 2 in Octal
110 in binary = 0*1 + 1*2 + 1*4 = 6 in Octal
011 in binary = Octal 3
So,
010110011 in binary = octal 263

Prove these:
1. 10101.01101 in binary = 25.32 in octal (hint 010 101 . 011 010 )
2. 1101100.111 in binary = 154.7 in octal

2. Octal to Binary:
Convert the Octal digit in binary digit in three three’s pairs from the relationship table or calculate and combined them for required result.
Example: Find 263 in octal to binary
Octal 2 = 010 in binary
Octal 6 = 110 in binary
Octal 3 = 011 in binary
So octal 263 = 010 110 011 = 010110011 in binary
Practice: Prove these:
1. 732.16 in octal = 111011010.001110 in binary
2. 2172.01 in octal = 010001111010.000001 in binary

3. Binary to Hexadecimal:
Prepare the binary digit in Four-Four’s pairs. If leftmost group pair has fewer bits then attach required number of leading 0 to become pairs of four. After preparing pairs calculate one hexadecimal digit for each group or check the value of binary in hexadecimal from the relationship table.

Example:
Change a binary digit 1101110 in hexadecimal form?
1101110 = 0110 1110
0110 in binary = 0*1+1*2+1*4+0*8 = 6 in Hexaadecimal
1110 in binary = 0*1 + 1*2 + 1*4 +1*8= 14 = E in Hexadecimal
So,
1101110 in binary = 6E in hexadecimal

Prove these:
1. 110101.011001 in binary =35.64 in hexadecimal
( hint 0011 0101 . 0110 0100)
2. 100001011.000011 in binary = 10B.0C in hexadecimal

4. Hexadecimal to Binary
Convert the Hexadecimal digit in binary digit in Four Four’s pairs from the relationship table or calculate and combined them for required result.

Example: Find 6E in Hexadecimal to binary
Hexadecimal 6 = 0110 in binary
Hexadecimal E = 14 = 1110 in binary
So
Hexadecimal 6E = 0110 1110 = 1101110 in binary

Example:
1. Convert a binary number 11001 into octal?

Sol:
By indirect method:
Step:1 First convert this given(binary) digit into decimal
11001= 1*1 + 0*2 + 0*4 + 1*8 + 1*16 = 25in decimal
Step:2 Convert step 1’s coming decimal digit into required (octal) digit
25in deciaml = 31 in octal
DIVISION QUOTIENT REMAINDER
25/8 3 1
3/8 0 3

By Direct method:
Given digit------ 11001 = 011001
011 is equivalent to 3
001 is equivalent to 1
So 011 001 in binary
3 1 in octal

Relation between Binary & Octal Number System
Decimal Number Binary Number
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

Practice:
Prove these:
1. 314in base 5 = 1110in base 4
2. 3AB in base 15 = 6A0 in base 11
3. B.F4in hexadecimal = 111001.10100101 in binary



D… CONVERSION FOR FRACTIONAL NUMBER

In fractional nos the decimal point plays a great role, so we have to understand the digits before decimal and after decimal. There are different methods for other base to decimal and decimal to other base.

OTHER BASE TO DECIMAL

Rules: In other base to decimal we will follow these operations on the digits which are :
Before decimal – then (given)base’s power will positive in multiplication method to change in decimal digit.
After Decimal – then change in decimal no., we will put (given base 2/8/16….) base’s power negative starting from -1,-2,-3…… by multiplication method.
…( in base ten also 1.36=1*100 + 3*10-1+6*10-2)

E X . (336.23) 8 = ( ? ) 10
= (3 X 64) +(3 X 8)+(6 X 1)+(2 X 8-1)+(3 X 8-2)
= (222.296875) 10

Practice : Change these numbers in decimal-
1. 1789.16 in hexadecimal to decimal
2. 313.45 in octal
3. Prove : 710.10 in octal =456.125 in decimal
4. Prove: 1001.101in octal = 513.126953 in decimal
5. Prove : 11101101.10101 in binary = 237.65625 in decimal


DECIMAL TO OTHER BASE

Decimal to other base we will follow these operations on the digits which are :
Before decimal – then change decimal digit into required base by division method
After Decimal – change decimal no into required base by multiplication method
• Integer with fractional part
Rules:
1. We multiply given fractional part by 2/8/16(required base) and note the result in separate column.
2. The successive fractional parts of the previous result are multiplied by 2/8/16(required base) till the fractional part of the product become 0 or up to the accuracy.
3. The integer part of the product is written in downward direction to find the binary equivalent of the decimal fraction.

Example;
Change a decimal number 0.68 in octal equivalent?

Process Product decimal part integer part
0.68*8 5.44 .44 5
0.44*8 3.52 .52 3
0.52*8 4.16 .16 4
0.16*8 1.28 .28 1
0.28*8 2.24 .24 2

So, 0.68 in decimal = 0.53412 in octal


E X . (69.75)10= (?) 16

DIVISION QUOTIENT REMAINDER
69/16 4 5
4/16 0 4

AND 0.75 X 16=12 (C)

= (69.75)10= (45.C)16

Practice:
1. prove this (3634.6505)in decimal = (E32.A6872) in hexadecimal
2. Prove this: 493.69 in decimal = 1ED.B0A in hexadecimal
3. Prove : 100.011 in decimal = 1100100.0000001 in binary
4. Prove : 3161.36 in decimal = 6131.2702 in octal
5. Prove 336.36 in decimal 520.2702 in octal

09 September 2010

Manisha, in my memory- for my students and friends.....

Often my Mrs tell me something to share with my students. (I think that,which is she got by mails, magazines or newspapers or......, )


Today, One of them is in front of you,


A blind boy sat on the steps of a building with a hat by his feet. He held up a sign which said: 'I am blind, please help.' There were only a few coins in the hat.

A man was walking by. He took a few coins from his pocket and dropped them into the hat. He then took the sign, turned it around, and wrote some words. He put the sign back so that everyone who walked by would see the new words.

Soon the hat began to fill up. A lot more people were giving money to the blind boy. That afternoon the man who had changed the sign came to see how things were. The boy recognized his footsteps and asked, 'Were you the one who changed my sign this morning? What did you write?'

The man said, 'I only wrote the truth. I said what you said but in a different way.'
What he had written was: 'Today is a beautiful day and I cannot see it.'

Do you think the first sign and the second sign were saying the same thing?

Of course both signs told people the boy was blind. But the first sign simply said the boy was blind. The second sign told people they were so lucky that they were not blind. Should we be surprised that the second sign was more effective?


Now my manisha told me,"say your students - ,
"
Be thankful for what you have.
Be creative.
Be innovative.
Think differently and positively
."

"Invite others towards good with wisdom. Live life with no excuse and love with no regrets. When life gives you a 100 reasons to cry, show life that you have 1000 reasons to smile. Face your past without regret. Handle your present with confidence. Prepare for the future without fear. Keep the faith and drop the fear.

Great men say, 'Life has to be an incessant process of repair and reconstruction, of discarding evil and developing goodness…. In the journey of life, if you want to travel without fear, you must have the ticket of a good conscience.'

The most beautiful thing is to see a person smiling…
And even more beautiful is, knowing that you are the reason behind it!!!

And now today her words are in my memory,If you feel good then say to God ,........".Pl...........give me back my pearl"


May the soul rest in the peace

08 September 2010

O.. God.........Pl Give me back .


M


  • She was the mother of two tiny princes.
  • She was the best cook in my life.
  • She was the trouble shooter of my all problems.
  • She was the best human creature for slaves.
  • She was the sweatiest mom.
  • In her short life anyone who meet ones he/she can't forget her.
  • Now I feels, I am totally addicted with her, I can't survive anymore without her.
  • Most of her life was spent at hospitals and with her parents. with me a very short period..
  • She was the bridge between my community, parents, In-Laws and me....now what???????

.....O.... GOD ..

why you did it................

You have lot of pearls and diamonds ....Pl.........give me back my pearl.......

May the departed soul rest in Peace

30 August 2010

Sad Demise of My "Beloved Wife"

All of u will be shocked to hear about the sad Demise of my Beloved Wife......




"Manisha" "Lukky"

(27-06-82 to 20-08-10)

May the departed soul rest in peace.

19 February 2010

Dear rcert students ,
I am feeling great to receive your love and respect through mails and by orkut. Now if is there any problem regarding academics you are welcome any time. I will try my best to solve as an academic Director.

Vikram

06 February 2010

Query

Students are requested to send their queries (academic) on this blog only, There is no blog of mine related to academic query.
Thanks
In waiting of your queries.........
vikram

07 January 2010

PROGRAM LIST (B.TECH FIRST SEMESTER)

ASIANS INSTITUTE OF TECHNOLOGY

COMPUTER PROGRAMMING & IT

PROGRAM LIST

B.TECH FIRST SEMESTER

1. Write a program to print a “name”.

2. Write a program to calculate an addition of two numbers.

3. Write a program to calculate a area of circle.

4. Write the program to calculate all arithmetic operation.

5. Write a program of swapping of two numbers using three variables.

6. Write a program of swapping of two numbers using two variables.

7. Write a program of conversation [kilometer to meter].

8. Write a program of conversation [hour to minute].

9. Write a program to find a number even or odd.

10. Write a program to find leap year (using if & else).

11. Write the program to find the largest of 3 numbers (using if-else).

12. Write a program of check different colors (using switch).

13. Write a program of print days (using switch).

14. Write a program to read marks of five subject and print Division (if-else).

Percentage division

>=60 First

>=48 & <=59 Second

>=36 & < style="mso-spacerun:yes"> Third

<36 Fail

15. Write a program to check a given character is vowel or not (using switch).

1 6. Write a program to check whether a no. is palindrome or not.

17. Write a program to check whether a no. is prime or not.

18. Write a program to print ‘n’ terms Fibonacci series.

19. Write a program to calculate a table of any number.

20. Write the program to print ‘n’ terms Factorial series.

21. Write a program to reverse a given number.

22. Write a program to read ‘n’ numbers and find out maximum and second maximum value (using array).

23. Write a program to read two 3*3 matrix and add their value and store them in third matrix (using array).

24. Write a program in C to sort a given array of integer numbers.

25. Write a program to read two 3*3 matrix and multiply their value and store them in third matrix (using array).

26. Write a program to read 3*3 matrix and convert it into 4*4 matrix by adding corresponding row and columns.

27. Write a program to read a string and print it in alphabetical order e.g.”SHIVAM” will be printed as “AHIMSV”.

28. Write a program to reverse a string word wise.

29. Write a program to find length, copy, concatenate, compare, and reverse of string using pre-defined function.

30. Write a program to covert lower case string into upper case.

31. Write a program to print a different pattern using loop.

1. * 2. * 3. 1* 2* 3* 4*

* * * * * 1* 2* 3*

* * * * * * * * 1* 2*

* * * * * * * * * * * 1*

4. 10000 5. 1 6. * * * * *

01000 11 * * * *

00100 121 * * *

00010 1331 * *

00001 14641 *

7. 1* 2* 3* 4

1* 2* 3

1* 2

1

32. write a program in C to print the sum of the following series-

x - x3/3! + x5 /5! – x7/7!+………………

33. Write a program to read ‘n’ numbers and add them using pointer.

34. Write a program to create a structure student having student roll no, name and branch. Read information of a student and print it.

35. Write a program to read information of 20 books and print names and author name of those books whose price is more than 500r.

36. Write a program to read a line of text and store it into a file.

37. Write a program to read a text file and count total no of characters and words present in it.

38. Write a program to red a line of text and find out length of the string.

39. Write a program in C to copy contents of a file into another file.

40. Write a program to concatenate 2 strings using pointers. Do not use strcat function.

41. Write a program to create an enumerated data type for 12 months and then print them as integer constants.

42. Write a program to swap two numbers using pointer and function. (call by address mechanism)