Showing posts with label DIGITAL ELECTRONICS. Show all posts
Showing posts with label DIGITAL ELECTRONICS. Show all posts

Saturday, September 4, 2010

How Binary Code Works

Quick Binary Tutorial


People seem to freak out when they see binary. School math classes come flooding back and their mind freezes up. But there's no need for this at all. Don't think of binary as being difficult, just thing of it as different!

Binary terminology

Binary is a number system based on switches called bits. First, some terminology:

  • Each bit is switch.
  • Four bits is called a nibble.
  • Eight bits is called a byte.

If the switch is on, the value of the switch is 1. If the switch off, the value of the switch is 0.

Why people find binary "different"

There are few things about binary numbers that make them different to the plain vanilla decimal (base10) numbers that surround us every day.

  1. Binary only uses two of the digits that we are used to - 0 and 1
  2. We need to learn to read them right to left (like decimal the smallest or least significant bit is on the right)

So, step 1 to binary success is to accept point 1 and just accept point 2!

Understanding binary

In these examples we will work with 8-bit binary - that is bytes. You can work with larger or smaller units but the byte is the most commonly used one.

OK, let's take a look at a byte of binary

01101101

OK, so the first thing to remember is to read the byte from right to left. Let's make things easier by creating a table:


Switch
On = 1
Off = 0
01101101
Bit Position87654321
Bit Value in decimal1286432168421


Bit position is simply the position of the bit from the right - the bit furthest to the right is bit 1 and the bit on the left is number 8.

Decimal value of a bit is dependant on the position of the bit in the byte. The decimal value of the first bit is 1, the second 2 and so on. The eighth bit has a decimal value of 128. Converting a byte into decimal is simply adding up the decimal values of each on bit in the byte.

Highlight all the on bits and ignore the off bits:


Switch
On = 1
Off = 0
01101101
Bit Position87654321
Bit Value in decimal

128

6432168421
01101101 = 64 +32 + 8 +4 + 1


Bit 8 = 0

Bit 7 = 64

Bit 6 = 32

Bit 5 = 0

Bit 4 = 8

Bit 3 = 4

Bit 2 = 0

Bit 1 = 1





Friday, September 3, 2010

Flip-Flops

There are some circuits that are not quite as straight forward as the gate circuits we have discussed in earlier lessons. However, you still need to learn about circuits that can store and remember information. They're the kind of circuits that are used in computers to store program information - RAM memory.

In this lesson we'll look at the background for those kinds of memory circuits. Our goal is the following.

Given a flip-flop circuit,
Determine how the circuit will behave for a sequence of inputs.
Be able to use a flip-flop to store a single bit.

Reference: http://www.facstaff.bucknell.edu/mastascu/elessonshtml/Logic/Logic4.html
:

Why Do You Need To Know About Karnaugh Maps?



Karnaugh Maps are used for many small design problems. It's true that many larger designs are done using computer implementations of different algorithms. However designs with a small number of variables occur frequently in interface problems and that makes learning Karnaugh Maps worthwhile. In addition, if you study Karnaugh Maps you will gain a great deal of insight into digital logic circuits.

In this section we'll examine some Karnaugh Maps for three and four variables. As we use them be particularly tuned in to how they are really being used to simplify Boolean functions.

The goals for this lesson include the following.

Given a Boolean function described by a truth table or logic function,
Draw the Karnaugh Mapfor the function.
Use the information from a Karnaugh Map to determine the smallest sum-of-products function.