You are on page 1of 14

Signed and Unsigned Numbers

An 8 bit number system can be used to create 256 combinations (from 0


to 255), and the first 128 combinations (0 to 127) represent positive
numbers and next 128 combinations (128 to 255) represent negative
numbers.

The positive numbers are counted in a clockwise direction from 0 and


the negative numbers are counted in a counter-clockwise direction.
In Decimal in order to get - 2, we subtract 2 from the number of
combinations (256), which gives, 256 - 2 = 254.

In Binary all the Signed Numbers have a '1' in the Most Significant Bit
(MSB) position which represents a negative number and a '0' in the
Most Significant Bit (MSB) position which represents a positive number.

Also, in Binary, the 2's Complement of a number is the negative


equivalent of the positive number.

Equation Binary Hex Signed


2 = 0000 0010 02 +2
1's Complement = 1111 1101 FD
Add '1' +0000 0001 +01
2's Complement = 1111 1110 FE -2

So, as above, +2 = 0000 0010 and the 2's Complement is 1111 1110
which represents - 2.

A 16 bit number system can be used to create 65536 combinations


(from 0 to 65535), and the first 32768 combinations (0 to 32767)
represent positive numbers and next 32768 combinations (32768 to
65536) represent negative numbers.

In a 16 bit number system the Signed Numbers have a '1' in the Most
Significant Bit (MSB) position 1xxx xxxx xxxx xxxx which represents a
negative number. A '0' in the Most Significant Bit (MSB) position 0xxx
xxxx xxxx xxxx which represents a positive number.

Binary multiplication

is actually much simpler than decimal multiplication. In the case of


decimal multiplication, we need to remember 3 x 9 = 27, 7 x 8 = 56,
and so on. In binary multiplication, we only need to remember the
following,

0 x 0 = 0
0 x 1 = 0
1 x 0 = 0
1 x 1 = 1
Note that since binary operates in base 2, the multiplication rules we
need to remember are those that involve 0 and 1 only. As an example
of binary multiplication we have 101 times 11,

101
x1 1

First we multiply 101 by 1, which produces 101. Then we put a 0 as a


placeholder as we would in decimal multiplication, and multiply 101
by 1, which produces 101.

101
x1 1
101
1010 <-- the 0 here is the placeholder

The next step, as with decimal multiplication, is to add. The results


from our previous step indicates that we must add 101 and 1010, the
sum of which is 1111.

101
x11
101
1010
1111Binary division
is almost as easy, and involves our knowledge of binary
multiplication. Take for example the division of 1011 into 11.

11 R=10
11 )1011
-11
101
-11
10 <-- remainder, R

To check our answer, we first multiply our divisor 11 by our


quotient 11. Then we add its' product to the remainder 10, and
compare it to our dividend of 1011.

11
x 11
11
11
1001 <-- product of 11 and 11

1001
+ 10
1011 <-- sum of product and remainder

The sum is equal to our initial dividend, therefore our solution is


correct.

To practice binary addition and subtraction, visit the Practice


Exercises page.

ASCII ( /ski/ ASS-kee),[1]:6 abbreviated from American Standard


i

Code for Information Interchange, is a character


encoding standard (the Internet Assigned Numbers Authority (IANA)
prefers the name US-ASCII[2]). ASCII codes represent text in
computers, telecommunications equipment, and other devices. Most
modern character-encoding schemes are based oASCII was
developed from telegraph code. Its first commercial use was as a
seven-bit teleprinter code promoted by Bell data services. Work on
the ASCII standard began on October 6, 1960, with the first meeting
of the American Standards Association's (ASA) (now the American
National Standards Institute or ANSI) X3.2 subcommittee. The first
edition of the standard was published in 1963, [3][4] underwent a major
revision during 1967,[5][6] and experienced its most recent update
during 1986.[7] Compared to earlier telegraph codes, the proposed
Bell code and ASCII were both ordered for more convenient sorting
(i.e., alphabetization) of lists, and added features for devices other
than teleprinters.n ASCII, although they support many additional
characters.

A June 1992 RFC[12] and the Internet Assigned Numbers


Authority registry of character sets[2] recognize the following case-
insensitive aliases for ASCII as suitable for use on the Internet:
ANSI_X3.4-1968 [sic] (canonical name), iso-ir-6, ANSI_X3.4-1986,
ISO_646.irv:1991, ASCII, ISO646-US, US-ASCII
(preferred MIME name),[2] us, IBM367, cp367, and csASCII.
Of these, the IANA encourages use of the name "US-ASCII" for
Internet uses of ASCII (even if it is a redundant acronym,
but the US is needed because of regular confusion of the
ASCII term with other 8 bit based character encoding
schemes such as Extended ASCII or UTF-8 for example).
One often finds this in the optional "charset" parameter in
the Content-Type header of some MIME messages, in the
equivalent "meta" element of some HTML documents, and
in the encoding declaration part of the prologue of som Bit
width[edit]
The X3.2 subcommittee designed ASCII based on the
earlier teleprinter encoding systems. Like other character encodings,
ASCII specifies a correspondence between digital bit patterns
and character symbols (i.e. graphemes and control characters). This
allows digital devices to communicate with each other and to process,
store, and communicate character-oriented information such as
written language. Before ASCII was developed, the encodings in use
included 26 alphabetic characters, 10 numerical digits, and from 11 to
25 special graphic symbols. To include all these, and control
characters compatible with the Comit Consultatif International
Tlphonique et Tlgraphique (CCITT) International Telegraph
Alphabet No. 2 (ITA2) standard of 1924,[24][25] FIELDATA (1956[citation needed]),
and early EBCDIC (1963), more than 64 codes were required for
ASCII.
e XML documents. Excess-3 or 3-excess[1] binary code (often
abbreviated as XS-3 or X3[2][3]) or Stibitz code[1] (after George Stibitz)
is a self complementary binary-coded decimal code and numeral
system. It is a biased representation. Excess-3 was used on some
older computers as well as in cash registers and hand-held portable
electronic calculators of the 1970s, among other uses.
Contents
[hide]

1Representation
2Motivation
3Example
4See also
5References
Biased codes are a way to represent values with a balanced number
of positive and negative numbers using a pre-specified number N as
a biasing value. Biased codes (and Gray codes) are nonweighted
codes. In XS-3, numbers are represented as decimal digits, and each
digit is represented by four bits as the digit value plus 3 (the "excess"
amount):

The smallest binary number represents the smallest value (0


excess).
The greatest binary number represents the largest value (2N+1
excess 1).

Excess-3 / Stibitz code

Decimal Excess-3 Stibitz BCD 8-4-2-1 Binary

3 0000 pseudo-tetrade N/A N/A

2 0001 pseudo-tetrade N/A N/A

1 0010 pseudo-tetrade N/A N/A

0 0011 0011 0000 0000

1 0100 0100 0001 0001

2 0101 0101 0010 0010

3 0110 0110 0011 0011


4 0111 0111 0100 0100

5 1000 1000 0101 0101

6 1001 1001 0110 0110

7 1010 1010 0111 0111

8 1011 1011 1000 1000

9 1100 1100 1001 1001

10 1101 pseudo-tetrade pseudo-tetrade 1010

11 1110 pseudo-tetrade pseudo-tetrade 1011

12 1111 pseudo-tetrade pseudo-tetrade 1100

13 N/A N/A pseudo-tetrade 1101

14 N/A N/A pseudo-tetrade 1110

15 N/A N/A pseudo-tetrade 1111

To encode a number such as 127, one simply encodes each of the


decimal digits as above, giving (0100, 0101, 1010).
Excess-3 arithmetic uses different algorithms than normal non-biased
BCD or binary positional system numbers. After adding two excess-3
digits, the raw sum is excess-6. For instance, after adding 1 (0100 in
excess-3) and 2 (0101 in excess-3), the sum looks like 6 (1001 in
excess-3) instead of 3 (0110 in excess-3). In order to correct this
problem, after adding two digits, it is necessary to remove the extra
bias by subtracting binary 0011 (decimal 3 in unbiased binary) if the
resulting digit is less than decimal 10, or subtracting binary 1101
(decimal 13 in unbiased binary) if an overflow (carry) has occurred.
(In 4-bit binary, subtracting binary 1101 is equivalent to adding 0011
and vice versa.)

entity bcdxs3 is
port (
a : in std_logic;
b : in std_logic;
c : in std_logic;
d : in std_logic;

an : inout std_logic;
bn : inout std_logic;
cn : inout std_logic;
dn : inout std_logic;

w : out std_logic;
x : out std_logic;
y : out std_logic;
z : out std_logic
);
end entity bcdxs3;

architecture dataflow of bcdxs3 is


begin
an <= not a;
bn <= not b;
cn <= not c;
dn <= not d;

w <= (an and b and d ) or (a and bn and


cn)
or (an and b and c and dn);
x <= (an and bn and d ) or (an and bn and c
and dn)
or (an and b and cn and dn) or (a and bn
and cn and d);
y <= (an and cn and dn) or (an and c and d
)
or (a and bn and cn and dn);
z <= (an and dn) or (a and bn and cn and
dn);

end architecture dataflow; -- of bcdxs3

Digital Systems, Seattle, USA, between 1966 and 1979 an


accounting service and technology development company
founded by John Torode.[1][2][3] Also kind of a predecessor to
microcomputer design and development company Digital
Microsystems, Inc. (DMS), Oakland, USA, founded in 1979.
Digital Systems was the first Internet service
provider in Bulgaria. The company was established in 1989 with
their main business activities being computer
systems and networks. It has been offering Internet services since
1991.
Digital Systems LTD is a software development company in
Greece since 1987. ERP EXELIXI is their first ERP in Greece.

Analog and digital signals are used to transmit


information, usually through electric signals. In both
these technologies, the information, such as any
audio or video, is transformed into electric signals.
The difference between analog and
digital technologies is that in analog technology,
information is translated into electric pulses of
varying amplitude. In digital technology, translation
of information is into binary format (zero or one)
where each bit is representative of two distinct
amplitudes.

Digital
Analog
Signal Analog signal is a continuous signal which
represents physical measurements.

Waves Denoted by sine waves

Representation Uses continuous range of values to


represent information

Example Human voice in air, analog electronic devices.

Technology Analog technology records waveforms as they ar


Digital
Analog

Data transmissions Subjected to deterioration by noise during


transmission and write/read cycle.

Response to Noise More likely to get affected reducing accuracy

Flexibility Analog hardware is not flexible.

Uses Can be used in analog devices only. Best suited


for audio and video transmission.

Applications Thermometer
Digital
Analog
Bandwidth Analog signal processing can be done in real time
and consumes less bandwidth.

Memory Stored in the form of wave signal

Power Analog instrument draws large power

Cost Low cost and portable

Impedance Low
Digital
Analog
Errors Analog instruments usually have a scale which is
cramped at lower end and give considerable
observational errors.

An Analog signal is any continuous signal for which the time varying
feature (variable) of the signal is a representation of some other time
varying quantity, i.e., analogous to another time varying signal. It differs
from a digital signal in terms of small fluctuations in the signal which are
meaningful.

A digital signal uses discrete (discontinuous) values. By contrast, non-


digital (or analog) systems use a continuous range of values to
represent information. Although digital representations are discrete, the
information represented can be either discrete, such as numbers or
letters, or continuous, such as sounds, images, and other
measurements of continuous systems.

Synchronization digital communication uses specific


synchronization sequences for determining synchronization.
Language digital communications requires a language which
should be possessed by both sender and receiver and should specify
meaning of symbol sequences.
Errors disturbances in analog communication causes errors in
actual intended communication but disturbances in digital
communication does not cause errors enabling error free
communication. Errors should be able to substitute, insert or delete
symbols to be expressed.
Copying analog communication copies are quality wise not as
good as their originals while due to error free digital communication,
copies can be made indefinitely.
Granularity for a continuously variable analog value to be
represented in digital form there occur quantization error which is
difference in actual analog value and digital representation and this
property of digital communication is known as granularity.

You might also like