EE Digital Electronics/Lecture number systems and logic states ... [PDF]

Jump to The binary number system - One could easily imagine that a race of intelligent, six-fingered beings could quite

8 downloads 20 Views 893KB Size

Recommend Stories


NUMBER SYSTEMS AND CODES [PDF]
Octal system has certain advantages in digital work because it requires less circuitry to get information into and out of a digital system. Moreover, it is easier to read, record and print out octal numbers than binary numbers. Hexadecimal number sys

Arithmetic and number systems
Never wish them pain. That's not who you are. If they caused you pain, they must have pain inside. Wish

EE201: Digital Circuits and Systems Programmable Logic Devices
I tried to make sense of the Four Books, until love arrived, and it all became a single syllable. Yunus

EE-583: Digital Image Processing
We must be willing to let go of the life we have planned, so as to have the life that is waiting for

PDF Digital Systems: Principles and Applications
When you do things from your soul, you feel a river moving in you, a joy. Rumi

[PDF]Modern Digital and Analog Communication Systems
Be who you needed when you were younger. Anonymous

Number Systems
Live as if you were to die tomorrow. Learn as if you were to live forever. Mahatma Gandhi

[PDF] Modern Digital and Analog Communication Systems
Don't fear change. The surprise is the only way to new discoveries. Be playful! Gordana Biernat

EE 7400: Power Systems Operation and Planning
Your task is not to seek for love, but merely to seek and find all the barriers within yourself that

Digital Logic Fundamentals
The only limits you see are the ones you impose on yourself. Dr. Wayne Dyer

Idea Transcript


EE Digital Electronics/Lecture number systems and logic states Contents Overview The decimal number system Digit

[hide]EE111 Edit/View

Radix Notation

Electronic Engineering

The binary number system

EE Digital Electronics

Counting in Binary

Lecture, Number systems and logic states

Bits and bytes

Lecture, Digital Logic Gates

Counting

Lecture, Combinatorial Functions

Basic binary arithmetic

Lecture, Karnaugh Map Reductions

Conversion between binary and decimal

Lecture, Arithmetic Lecture, Flip-flops

The octal number system

Mid-term Exam

Counting Octal arithmetic

Lecture, Sequential Logic

Conversion between binary and octal

Lecture, Memory Elements Lecture, Registers and Counters

Conversion from decimal to octal

Lecture, Advanced Sequential Circuits

The hexadecimal number system

Lecture, Logic Simulation Lecture, High Level Language Logic Modelling and Synthesis

Counting

Final Exam

Hexadecimal arithmetic Conversion between hexadecimal and binary Representing Logic States Exercises Further reading

Overview This lecture will introduce some basic number system concepts and introduce number systems useful in electrical and computer engineering.

The decimal number system In childhood, people are often taught the fundamentals of counting by using their fingers. Counting from one to ten is one of many milestones a child achieves on their way to becoming educated members of society. We will review these basic facts on our way to gaining an understanding of alternate number systems. The child is taught that the fingers and thumbs can be used to count from one to ten. Extending one finger represents a count of one; two fingers represents a count of two, and so on up to a maximum count of ten. No fingers (or thumbs) refers to a count of zero. The child is later taught that there are certain symbols called digits that can be used to represent these counts. These digits are, of course:

Ten, of course, is a special case, since it is comprised of two digits. Before we go deeper, we need a few fundamental definitions.

Digit A digit is a symbol given to an element of a number system.

Radix Notation The radix, or base of a counting system is defined as the number of unique digits in a given number system. Back to our elementary example. We know that our hypothetical child can count from zero to ten using their fingers and thumbs. There are ten unique digits in this counting system, therefore the radix of our elementary counting system is ten. We represent the radix of our counting system by putting the radix in subscript to the right of the digits. For example,

represents 3 in decimal (base 10). Our special case (ten) illustrates a fundamental rule of our number system that was not readily apparent - what happens when the count exceeds the highest digit? Obviously, a new digit is added, to the left of our original digit which is "worth more", or has a higher weight than our original digit. (In reality, there *always* are digits to the left; we simply choose not to write those digits to the left of the first nonzero.)

When our count exceeds the highest digit available, the next digit to the left is incremented and the original digit is reset to zero. For example:

Because we are dealing with a base-10 system, each digit to the left of another digit is weighted ten times higher. Using exponential notation, we can imagine the number 10 as representing:

The fundamentals of decimal arithmetic will not be expanded on in this lecture.

The binary number system It is widely believed that the decimal system that we find so natural to use is a direct consequence of a human being's ten fingers and thumbs being used for counting purposes. One could easily imagine that a race of intelligent, sixfingered beings could quite possibly have developed a base-six counting system. From this perspective, consider the hypothesis: the most intuitive number system for an entity is that for which some natural means of counting exists. Since our focus is electronic and computer systems, we must narrow our focus from the human hand to the switch, arguably the most fundamental structure that can be used to represent a count. The switch can represent one of two states; either open, or closed. If we return to our original definition of a digit, how many digits are required to represent the possible states of our switch? Clearly, the answer is 2. We use the binary digits zero and one to represent the open and closed states of the switch.

Counting in Binary Counting in binary like base 10 can be accomplished with your fingers with some differences. In decimal base 10 each finger represents a number in the first digit 1, 2, 3, 4, 5, 6, 7, 8, 9 ,10 . When counting in binary each finger repesnets a seprate digit so counting is more like this.

each number is a finger dont use thumbs for binary value

decimal

binary

right left hand hand

4 fingers

0

00000 00000 0000

1

00000 01000 0001

2

00000 01100 0010

3

00000 01110 0011

4

00000 01111 0100

5

00000 11111 0101

6

00010 11111 0110

7

00110 11111 0111

8

01110 11111 1000

9

11110 11111 1001

10

11111 11111 1010

WHOA, hold on, that pattern doesn't make sense? Well when you consider that each digit in binary is worth 2 times more than the previous (right to left always) then it makes sense. Lets compare number lines. 128 ,64 ,32 ,16 ,8 ,4 ,2 ,1

binary

decimal 1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 ,24 ,25 ,26 ,27 ,.... TO BE CONTINUED

Bits and bytes A bit is a digit in the binary counting system. A nybble (also spelled nibble) is a binary number consisting of four bits. A byte, or octet is a binary number consisting of eight bits. From our earlier definition of radix, the binary system has a radix of two. We use the radix in the subscript much like we do with decimals:

Counting Similar to decimals, binary digits are weighted. Each bit is weighted twice as much as the bit to the right of it:

Counting from one to ten (base 10) in binary yields:

Basic binary arithmetic Binary addition, subtraction, multiplication and division operations work essentially the same as they do for decimals. For addition, you add equally-weighted bits, much like decimal addition (where you add equally-weighted digits) and carry as required to the left.

As you can see, a carry is generated in the

column which increments the

column.

Subtraction works just like decimal arithmetic, using borrowing as required.

Here, a borrow is required, reducing the

column to

and changing the

column to

.

Multiplication is straightforward also:

Division is left as an exercise to the student [hint: use long division].

Conversion between binary and decimal When you consider a binary number in exponential form, you can easily perform a decimal conversion:

...simply add up the factors.

To convert from decimal to binary, you can repeatedly divide the decimal by two until the result of the division is zero. Starting from the rightmost bit, write 1 if the division has a remainder, zero if it does not. For example, to convert the decimal 74 into binary:

* 74 / 2 = 37 remainder 0; -> 0 * 37 / 2 = 18 remainder 1; -> 10 * 18 / 2 = 9 remainder 0; -> 010 * 9 / 2 = 4 remainder 1; -> 1010 * 4 / 2 = 1 remainder 0; -> 01010 * 2 / 2 = 1 remainder 0; -> 001010 * 1 / 2 = 0 remainder 1; -> 1001010

The octal number system The name octal implies eight, if you consider that an octagon has eight sides. Octal has a radix of eight, and uses the following octal digits:

An octal number has the subscript 8.

Counting Counting from one to ten (base 10) in octal yields:

Octal arithmetic Octal arithmetic, like binary arithmetic, follows the same rules and patterns of decimal arithmetic. As an exercise, verify the following:

Conversion between binary and octal Each octal digit is representable by exactly three bits. This becomes obvious when you consider that the highest octal digit is seven, which can be represented in binary by

.

To convert a binary number to octal, group the bits in groups of three starting from the rightmost bit and convert each triplet to its octal equivalent.

To convert an octal number to binary, simply write the equivalent bits for each octal number.

Conversion from decimal to octal The repeated-division method described for binary will also work for octal, simply by changing the divisor to eight. To convert 67 (base 10 into octal):

* 67 / 8 = 8 remainder 3; -> 3 * 8 / 8 = 1 remainder 0; -> 03 * 1 / 8 = 0 remainder 1; -> 103

The hexadecimal number system The most commonly-used number system in computer systems is the hexadecimal, or more simply hex, system. It has a radix of 16, and uses the numbers zero through nine, as well as A through F as its digits:

Hex numbers can have the subscript 16, but more often have a leading *0x* to indicate their type.

Counting Counting from zero to twenty (base 10) in hex yields:

Hexadecimal arithmetic Hex arithmetic, yet again, follows the same rules and patterns of decimal arithmetic. As an exercise, verify the following:

Conversion between hexadecimal and binary Each hex digit is representable by exactly four bits. This becomes obvious when you consider that the highest hex digit represents fifteen, which can be represented in binary by

.

To convert a binary number to hex, group the bits in groups of four starting from the rightmost bit and convert each group to its hex equivalent.

To convert an hex number to binary, simply write the equivalent bits for each hex number.

Representing Logic States high 1 or on

X 100M X 100K X 100 X 100m X 100µ

low 0 or off

X 100M X 100K

A DC

X 100

AC C L

X 100m X 100µ

A DC AC C L

VCC to Vhigh in = logic high vlow in to gnd = logic low technology

CMOS

TTL/CMOS

TTL

LVTTL

LVCMOS

technology type

AC, HC, AHC, H

ACT, HCT, AHCT, FCT

F, S, AS, LS, ALS

LV

LV, LVC, ALVC

5v

5v

5v-4.5v

3.6v-3v

3.6v-3v

vhigh Out

4.7v

4.7v

3.3v or 2.4v

2.4v

3.5v

vhigh In Min

3.7v

2.0v

2.0v

2.0v

2.6v

vlow In Max

1.3v

.8v

.8v

.8v

.72v

vlow Out

.2v

.2v

.35v

.4v

.54v

vcc

transition

Most 5v logic will have no problem with a 5V high or a 0V low. You should always refer to the data sheet before choosing your device.[1] (http://www.interfacebus.com/voltage_LV_threshold.html) The range in between "vhigh lower" and "vlow higher" should be avoided and as little time as possible should ever be spent here.

Exercises 1. Convert the following binary numbers to decimal:

2. Convert the following decimal numbers to binary:

3. Add the following numbers:

Further reading 1. Mano, M. Morris. (2001) Digital Design, 3rd edition (Prentice Hall); ISBN 978-0130621214 2. Floyd, Thomas L. (2002) Digital Fundamentals, 8th edition (Prentice Hall); ISBN 978-0130942005

[hide]EE111 Edit/View * Electronic Engineering * EE Digital Electronics * Lecture, Number systems and logic states * Lecture, Digital Logic Gates * Lecture, Combinatorial Functions * Lecture, Karnaugh Map Reductions * Lecture, Arithmetic * Lecture, Flip-flops * Mid-term Exam * Lecture, Sequential Logic * Lecture, Memory Elements * Lecture, Registers and Counters * Lecture, Advanced Sequential Circuits * Lecture, Logic Simulation * Lecture, High Level Language Logic Modelling and Synthesis * Final Exam

Resource type: this resource contains a lecture or lecture notes.

Retrieved from "https://en.wikiversity.org/w/index.php?title=EE_Digital_Electronics/Lecture_number_systems_and_logic_states&oldid=1631535"

This page was last edited on 15 November 2016, at 16:31. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.