Tuesday, March 5, 2024

Logic Gates


A logic gate is a device that acts as a building block for digital circuits. They perform basic logical functions that are fundamental to digital circuits. Most electronic devices we use today will have some form of logic gates in them. For example, logic gates can be used in technologies such as smartphones, tablets or within memory devices.

In a circuit, logic gates will make decisions based on a combination of digital signals coming from its inputs. Most logic gates have two inputs and one output. Logic gates are based on Boolean algebra. At any given moment, every terminal is in one of the two binary conditions, false or true. False represents 0, and true represents 1. Depending on the type of logic gate being used and the combination of inputs, the binary output will differ. A logic gate can be thought of like a light switch, wherein one position the output is off -- 0, and in another, it is on -- 1. Logic gates are commonly used in integrated circuits (IC).

Basic logic gates

There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.

The AND gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. (In the symbol, the input terminals are at left and the output terminal is at right.) The output is "true" when both inputs are "true." Otherwise, the output is "false." In other words, the output is 1 only when both inputs one AND two are 1.

 

AND gate

Input 1Input 2Output
   
 1 
1  
111

The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false." In other words, for the output to be 1, at least input one OR two must be 1.

 

OR gate


Input 1Input 2Output
   
 11
1 1
111

 

The XOR ( exclusive-OR ) gate acts in the same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same. 

 

 

XOR gate

Input 1Input 2Output
   
 11
1 1
11 

 

A logical inverter, sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state. If the input is 1, then the output is 0. If the input is 0, then the output is 1.  

 

 

 

Inverter or NOT gate
InputOutput
1 
 1

 

The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true."

 

NAND gate

Input 1Input 2Output
  1
 11
1 1
11 

 

The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if both inputs are "false." Otherwise, the output is "false."

NOR gate

Input 1Input 2Output
  1
 1 
1  
11 

 

The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same, and "false" if the inputs are different.

 

XNOR gate

Input 1Input 2Output
  1
 1 
1  
111

Complex operations can be performed using combinations of these logic gates. In theory, there is no limit to the number of gates that can be arrayed together in a single device. But in practice, there is a limit to the number of gates that can be packed into a given physical space. Arrays of logic gates are found in digital ICs. As IC technology advances, the required physical volume for each individual logic gate decreases and digital devices of the same or smaller size become capable of performing ever-more-complicated operations at ever-increasing speeds.

Composition of logic gates

High or low binary conditions are represented by different voltage levels. The logic state of a terminal can, and generally does, often change as the circuit processes data. In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately five volts positive (+5 V).

Logic gates can be made of resistors and transistors or diodes. A resistor can commonly be used as a pull-up or pull-down resistor. Pull-up and pull-down resistors are used when there are any unused logic gate inputs to connect to a logic level 1 or 0. This prevents any false switching of the gate. Pull-up resistors are connected to Vcc (+5V), and pull-down resistors are connected to ground (0 V).

Commonly used logic gates are TTL and CMOS. TTL, or Transistor-Transistor Logic, ICs will use NPN and PNP type Bipolar Junction Transistors. CMOS, or Complementary Metal-Oxide-Silicon, ICs are constructed from MOSFET or JFET type Field Effect Transistors. TTL IC's may commonly be labeled as the 7400 series of chips, while CMOS ICs may often be marked as a 4000 series of chips.

 

Monday, March 4, 2024

Memory


Memory is the electronic holding place for the instructions and data a computer needs to reach quickly. It's where information is stored for immediate use. Memory is one of the basic functions of a computer, because without it, a computer would not be able to function properly. Memory is also used by a computer's operating system, hardware and software.

There are technically two types of computer memory: primary and secondary. The term memory is used as a synonym for primary memory or as an abbreviation for a specific type of primary memory called random access memory (RAM). This type of memory is located on microchips that are physically close to a computer's microprocessor.

If a computer's central processer (CPU) had to only use a secondary storage device, computers would become much slower. In general, the more memory (primary memory) a computing device has, the less frequently the computer must access instructions and data from slower (secondary) forms of storage.

Memory vs. storage

The concept of memory and strorage can be easily conflated as the same concept; however, there are some distinct and important differences. Put succinctly, memory is primary memory, while storage is secondary memory. Memory refers to the location of short-term data, while storage refers to the location of data stored on a long-term basis.

Memory is most often referred to as the primary storage on a computer, such as RAM. Memory is also where information is processed. It enables users to access data that is stored for a short time. The data is only stored for a short time because primary memory is volatile, meaning it isn't retained when the computer is turned off.

The term storage refers to secondary memory and is where data in a computer is kept. An example of storage is a hard drive or a hard disk drive (HDD). Storage is nonvolatile, meaning the information is still there after the computer is turned off and then back on. A running program may be in a computer's primary memory when in use -- for fast retrieval of information -- but when that program is closed, it resides in secondary memory or storage.

How much space is available in memory and storage differs as well. In general, a computer will have more storage space than memory. For example, a laptop may have 8 GB of RAM while having 250 GB of storage. The difference in space is there because a computer will not need fast access to all the information stored on it at once, so allocating approximately 8 GB of space to run programs will suffice.

The terms memory and storage can be confusing because their usage today is not always consistent. For example, RAM can be referred to as primary storage -- and types of secondary storage can include flash memory. To avoid confusion, it can be easier to talk about memory in terms of whether it is volatile or nonvolatile -- and storage in terms of whether it is primary or secondary.

How does computer memory work?

When a program is open, it is loaded from secondary memory to primary memory. Because there are different types of memory and storage, an example of this could be a program being moved from a solid-state drive (SSD) to RAM. Because primary storage is accessed faster, the opened program will be able to communicate with the computer's processor at quicker speeds. The primary memory can be accessed immediately from temporary memory slots or other storage locations.

Memory is volatile, which means that data in memory is stored temporarily. Once a computing device is turned off, data stored in volatile memory will automatically be deleted. When a file is saved, it will be sent to secondary memory for storage.

There are multiple types of memory available to a computer. It will operate differently depending on the type of primary memory used, but in general, semiconductor-based memory is most associated with memory. Semiconductor memory will be made of integrated circuits with silicon-based metal-oxide-semiconductor (MOS) transistors.

Types of computer memory

In general, memory can be divided into primary and secondary memory; moreover, there are numerous types of memory when discussing just primary memory. Some types of primary memory include the following

  • Cache Memory. This temporary storage area, known as a cache read as "cash" is more readily available to the processor than the computer's main memory source. It is also called CPU memory because it is typically integrated directly into the CPU chip or placed on a separate chip with a bus interconnect with the CPU.

  • RAM. The term is based on the fact that any storage location can be accessed directly by the processor.

  • Dynamic RAM. DRAM is a type of semiconductor memory that is typically used by the data or program code needed by a computer processor to function.

  • Static RAM. SRAM retains data bits in its memory for as long as power is supplied to it. Unlike DRAM, which stores bits in cells consisting of a capacitor and a transistor, SRAM does not have to be periodically refreshed.

  • Double Data Rate SDRAM. DDR SRAM is SDRAM that can theoretically improve memory clock speed to at least 200 MHz.

  • Double Data Rate 4 Synchronous Dynamic RAM. DDR4 RAM is a type of DRAM that has a high-bandwidth interface and is the successor to its previous DDR2 and DDR3 versions. DDR4 RAM allows for lower voltage requirements and higher module density. It is coupled with higher data rate transfer speeds and allows for dual in-line memory modules (DIMMS) up to 64 GB.

  • Rambus Dynamic RAM. DRDRAM is a memory subsystem that promised to transfer up to 1.6 billion bytes per second. The subsystem consists of RAM, the RAM controller, the bus that connects RAM to the microprocessor and devices in the computer that use it.

  • Read-only memory. ROM is a type of computer storage containing nonvolatile, permanent data that, normally, can only be read and not written to. ROM contains the programming that enables a computer to start up or regenerate each time it is turned on.

  • Programmable ROM. PROM is ROM that can be modified once by a user. It enables a user to tailor a microcode program using a special machine called a PROM programmer.

  • Erasable PROM. EPROM is programmable read-only memory PROM that can be erased and re-used. Erasure is caused by shining an intense ultraviolet light through a window designed into the memory chip.

  • Electrically erasable PROM. EEPROM is a user-modifiable ROM that can be erased and reprogrammed repeatedly through the application of higher than normal electrical voltage. Unlike EPROM chips, EEPROMs do not need to be removed from the computer to be modified. However, an EEPROM chip must be erased and reprogrammed in its entirety, not selectively.

  • Virtual Memory. A memory management technique where secondary memory can be used as if it were a part of the main memory. Virtual memory uses hardware and software to enable a computer to compensate for physical memory shortages by temporarily transferring data from RAM to disk storage

Thursday, February 29, 2024

Sequential and Combinational Circuits

Sequential circuit combinational logic circuit that consists of inputs variable (X), logic gates (Computational circuit), and output variable (Z).

Combinational circuit produces an output based on input variable only, but Sequential circuit produces an output based on current input and previous input variables. That means sequential circuits include memory elements which are capable of storing binary information. That binary information defines the state of the sequential circuit at that time. A latch capable of storing one bit of information.

There are two types of input to the combinational logic :

  1. External inputs which not controlled by the circuit.
  2. Internal inputs which are a function of a previous output states.

Secondary inputs are state variables produced by the storage elements, where as secondary outputs are excitations for the storage elements.

Types of Sequential Circuits – There are two types of sequential circuit :

  • Asynchronous sequential circuit – These circuit do not use a clock signal but uses the pulses of the inputs. These circuits are faster than synchronous sequential circuits because there is clock pulse and change their state immediately when there is a change in the input signal. We use asynchronous sequential circuits when speed of operation is important and independent of internal clock pulse.But these circuits are more difficult to design and their output is uncertain.
  • Synchronous sequential circuit – These circuit uses clock signal and level inputs (or pulsed) (with restrictions on pulse width and circuit propagation). The output pulse is the same duration as the clock pulse for the clocked sequential circuits. Since they wait for the next clock pulse to arrive to perform the next operation, so these circuits are bit slower compared to asynchronous. Level output changes state at the start of an input pulse and remains in that until the next input or clock pulse.

    We use synchronous sequential circuit in synchronous counters, flip flops, and in the design of MOORE-MEALY state management machines.We use sequential circuits to design Counters, Registers, RAM, MOORE/MEALY Machine and other state retaining machines.

Combinational Circuits

A combinational circuit comprises of logic gates whose outputs at any time are determined directly from the present combination of inputs without any regard to previous inputs.

A combinational circuit performs a specific information-processing operation fully specified logically by a set of Boolean functions.

The basic components of a combinational circuit are: input variables, logic gates, and output variables.

Design procedure of a Combinational Circuit

The design procedure of a combinational circuit involves the following steps:

  1. The problem is stated.
  2. The total number of available input variables and required output variables is determined.
  3. The input and output variables are allocated with letter symbols.
  4. The exact truth table that defines the required relationships between inputs and outputs is derived.
  5. The simplified Boolean function is obtained from each output.
  6. The logic diagram is drawn.

The combinational circuit that performs the addition of two bits is called a half adder and the one that performs the addition of three bits (two significant bits and a previous carry) is a full adder.

 

 

 

Wednesday, February 28, 2024

Laws of Boolean Algebra


As well as the logic symbols “0” and “1” being used to represent a digital input or output, we can also use them as constants for a permanently “Open” or “Closed” circuit or contact respectively.

A set of rules or Laws of Boolean Algebra expressions have been invented to help reduce the number of logic gates needed to perform a particular logic operation resulting in a list of functions or theorems known commonly as the Laws of Boolean Algebra.

Boolean Algebra is the mathematics we use to analyse digital gates and circuits. We can use these “Laws of Boolean” to both reduce and simplify a complex Boolean expression in an attempt to reduce the number of logic gates required. Boolean Algebra is therefore a system of mathematics based on logic that has its own set of rules or laws which are used to define and reduce Boolean expressions.

The variables used in Boolean Algebra only have one of two possible values, a logic “0” and a logic “1” but an expression can have an infinite number of variables all labelled individually to represent inputs to the expression, For example, variables A, B, C etc, giving us a logical expression of A + B = C, but each variable can ONLY be a 0 or a 1.

Examples of these individual laws of Boolean, rules and theorems for Boolean Algebra are given in the following table.

Truth Tables for the Laws of Boolean

Boolean
Expression
DescriptionBoolean Algebra
Law or Rule
A + 1 = 1A in parallel with
closed = “CLOSED”
Annulment
A + 0 = AA in parallel with
open = “A”
Identity
A . 1 = AA in series with
closed = “A”
Identity
A . 0 = 0A in series with
open = “OPEN”
Annulment
A + A = AA in parallel with
A = “A”
Idempotent
A . A = AA in series with
A = “A”
Idempotent
NOT A = ANOT NOT A
(double negative) = “A”
Double Negation
A + A = 1A in parallel with
NOT A = “CLOSED”
Complement
A . A = 0A in series with
NOT A = “OPEN”
Complement
A+B = B+AA in parallel with B =
B in parallel with A
Commutative
A.B = B.AA in series with B =
B in series with A
Commutative
A+B = A.Binvert and replace OR with ANDde Morgan’s Theorem
A.B = A+Binvert and replace AND with ORde Morgan’s Theorem

The basic Laws of Boolean Algebra that relate to the Commutative Law allowing a change in position for addition and multiplication, the Associative Law allowing the removal of brackets for addition and multiplication, as well as the Distributive Law allowing the factoring of an expression, are the same as in ordinary algebra.

Each of the Boolean Laws above are given with just a single or two variables, but the number of variables defined by a single law is not limited to this as there can be an infinite number of variables as inputs too the expression. These Boolean laws detailed above can be used to prove any given Boolean expression as well as for simplifying complicated digital circuits.

A brief description of the various Laws of Boolean are given below with A representing a variable input.

Description of the Laws of Boolean Algebra

  • Annulment Law – A term AND´ed with a “0” equals 0 or OR´ed with a “1” will equal 1
  •  
    • A . 0 = 0    A variable AND’ed with 0 is always equal to 0
    • A + 1 = 1    A variable OR’ed with 1 is always equal to 1
  •  
  • Identity Law – A term OR´ed with a “0” or AND´ed with a “1” will always equal that term
  •  
    • A + 0 = A   A variable OR’ed with 0 is always equal to the variable
    • A . 1 = A    A variable AND’ed with 1 is always equal to the variable
  •  
  • Idempotent Law – An input that is AND´ed or OR´ed with itself is equal to that input
  •  
    • A + A = A    A variable OR’ed with itself is always equal to the variable
    • A . A = A    A variable AND’ed with itself is always equal to the variable
  •  
  • Complement Law – A term AND´ed with its complement equals “0” and a term OR´ed with its complement equals “1”
  •  
    • A . A = 0    A variable AND’ed with its complement is always equal to 0
    • A + A = 1    A variable OR’ed with its complement is always equal to 1
  •  
  • Commutative Law – The order of application of two separate terms is not important
  •  
    • A . B = B . A    The order in which two variables are AND’ed makes no difference
    • A + B = B + A    The order in which two variables are OR’ed makes no difference
  •  
  • Double Negation Law – A term that is inverted twice is equal to the original term
  •  
    • A = A     A double complement of a variable is always equal to the variable
  •  
  • de Morgan´s Theorem – There are two “de Morgan´s” rules or theorems,
  •  
  • (1) Two separate terms NOR´ed together is the same as the two terms inverted (Complement) and AND´ed for example:  A+B = A . B
  •  
  • (2) Two separate terms NAND´ed together is the same as the two terms inverted (Complement) and OR´ed for example:  A.B = A + B
 

Other algebraic Laws of Boolean not detailed above include:

  • Boolean Postulates – While not Boolean Laws in their own right, these are a set of Mathematical Laws which can be used in the simplification of Boolean Expressions.
  •  
    • 0 . 0 = 0    A 0 AND’ed with itself is always equal to 0
    • 1 . 1 = 1    A 1 AND’ed with itself is always equal to 1
    • 1 . 0 = 0    A 1 AND’ed with a 0 is equal to 0
    • 0 + 0 = 0    A 0 OR’ed with itself is always equal to 0
    • 1 + 1 = 1    A 1 OR’ed with itself is always equal to 1
    • 1 + 0 = 1    A 1 OR’ed with a 0 is equal to 1
    • 1 = 0    The Inverse (Complement) of a 1 is always equal to 0
    • 0 = 1    The Inverse (Complement) of a 0 is always equal to 1
  •  
  • Distributive Law – This law permits the multiplying or factoring out of an expression.
  •  
    • A(B + C) = A.B + A.C    (OR Distributive Law)
    • A + (B.C) = (A + B).(A + C)    (AND Distributive Law)
  •  
  • Absorptive Law – This law enables a reduction in a complicated expression to a simpler one by absorbing like terms.
  •  
    • A + (A.B) = (A.1) + (A.B) = A(1 + B) = A  (OR Absorption Law)
    • A(A + B) = (A + 0).(A + B) = A + (0.B) = A  (AND Absorption Law)
  •  
  • Associative Law – This law allows the removal of brackets from an expression and regrouping of the variables.
  •  
    • A + (B + C) = (A + B) + C = A + B + C    (OR Associate Law)
    • A(B.C) = (A.B)C = A . B . C    (AND Associate Law)

Boolean Algebra Functions

Using the information above, simple 2-input AND, OR and NOT Gates can be represented by 16 possible functions as shown in the following table.

FunctionDescriptionExpression
1.NULL0
2.IDENTITY1
3.Input AA
4.Input BB
5.NOT AA
6.NOT BB
7.A AND B (AND)A . B
8.A AND NOT BA . B
9.NOT A AND BA . B
10.NOT AND (NAND)A . B
11.A OR B (OR)A + B
12.A OR NOT BA + B
13.NOT A OR BA + B
14.NOT OR (NOR)A + B
15.Exclusive-ORA . B + A . B
16.Exclusive-NORA . B + A . B

Laws of Boolean Algebra Example No1

Using the above laws, simplify the following expression:  (A + B)(A + C)

Q =(A + B).(A + C) 
 A.A + A.C + A.B + B.C – Distributive law
 A + A.C + A.B + B.C – Idempotent AND law (A.A = A)
 A(1 + C) + A.B + B.C – Distributive law
 A.1 + A.B + B.C – Identity OR law (1 + C = 1)
 A(1 + B) + B.C – Distributive law
 A.1 + B.C – Identity OR law (1 + B = 1)
Q =A + (B.C) – Identity AND law (A.1 = A)
 

Then the expression:  (A + B)(A + C) can be simplified to A + (B.C) as in the Distributive law.

Tuesday, February 27, 2024

Code Conversion


There are many methods or techniques which can be used to convert code from one format to another. We'll demonstrate here the following

  • Binary to BCD Conversion
  • BCD to Binary Conversion
  • BCD to Excess-3
  • Excess-3 to BCD

Binary to BCD Conversion

Steps

  • Step 1 -- Convert the binary number to decimal.

  • Step 2 -- Convert decimal number to BCD.

Example − convert (11101)2 to BCD.

Step 1 − Convert to Decimal

Binary Number − 111012

Calculating Decimal Equivalent −

StepBinary NumberDecimal Number
Step 1111012((1 × 24) + (1 × 23) + (1 × 22) + (0 × 21) + (1 × 20))10
Step 2111012(16 + 8 + 4 + 0 + 1)10
Step 31110122910

Binary Number − 111012 = Decimal Number − 2910

Step 2 − Convert to BCD

Decimal Number − 2910

Calculating BCD Equivalent. Convert each digit into groups of four binary digits equivalent.

StepDecimal NumberConversion
Step 1291000102 10012
Step 2291000101001BCD

Result

(11101)2 =  (00101001)BCD

BCD to Binary Conversion

Steps

  • Step 1 -- Convert the BCD number to decimal.

  • Step 2 -- Convert decimal to binary.

Example − convert (00101001)BCD to Binary.

Step 1 - Convert to BCD

BCD Number − (00101001)BCD

Calculating Decimal Equivalent. Convert each four digit into a group and get decimal equivalent for each group.

StepBCD NumberConversion
Step 1(00101001)BCD00102 10012
Step 2(00101001)BCD210 910
Step 3(00101001)BCD2910

BCD Number − (00101001)BCD = Decimal Number − 2910

Step 2 - Convert to Binary

Used long division method for decimal to binary conversion.

Decimal Number − 2910

Calculating Binary Equivalent −

StepOperationResultRemainder
Step 129 / 2141
Step 214 / 270
Step 37 / 231
Step 43 / 211
Step 51 / 201

As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that the first remainder becomes the least significant digit (LSD) and the last remainder becomes the most significant digit (MSD).

Decimal Number − 2910 = Binary Number − 111012

Result

(00101001)BCD = (11101)2

BCD to Excess-3

Steps

  • Step 1 -- Convert BCD to decimal.

  • Step 2 -- Add (3)10 to this decimal number.

  • Step 3 -- Convert into binary to get excess-3 code.

Example − convert (0110)BCD to Excess-3.

Step 1 − Convert to decimal

(0110)BCD = 610

Step 2 − Add 3 to decimal

(6)10 + (3)10 = (9)10

Step 3 − Convert to Excess-3

(9)10 = (1001)2

Result

(0110)BCD = (1001)XS-3

Excess-3 to BCD Conversion

Steps

  • Step 1 -- Subtract (0011)2 from each 4 bit of excess-3 digit to obtain the corresponding BCD code.

Example − convert (10011010)XS-3 to BCD.

Given XS-3 number  = 1 0 0 1 1 0 1 0 
Subtract (0011)2   = 1 0 0 1 0 1 1 1
                    --------------------
               BCD = 0 1 1 0   0 1 1 1

Wednesday, February 21, 2024

Computer architecture


In computer engineering, computer architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer systems. Some definitions of architecture define it as describing the capabilities and programming model of a computer but not a particular implementation.

Von Neumann Architecture

Von Neumann architecture was first published by John von Neumann in 1945.

His computer architecture design consists of a Control Unit, Arithmetic and Logic Unit (ALU), Memory Unit, Registers and Inputs/Outputs.

Von Neumann architecture is based on the stored-program computer concept, where instruction data and program data are stored in the same memory.  This design is still used in most computers produced today.

Central Processing Unit (CPU)

The Central Processing Unit (CPU) is the electronic circuit responsible for executing the instructions of a computer program.

It is sometimes referred to as the microprocessor or processor.

 
 

The CPU contains the ALU, CU and a variety of registers.

Registers

Registers are high speed storage areas in the CPU.  All data must be stored in a register before it can be processed.

MARMemory Address RegisterHolds the memory location of data that needs to be accessed
MDRMemory Data RegisterHolds data that is being transferred to or from memory
ACAccumulatorWhere intermediate arithmetic and logic results are stored
PCProgram CounterContains the address of the next instruction to be executed
CIRCurrent Instruction registerContains the current instruction during processing

Arithmetic and Logic Unit (ALU)

The ALU allows arithmetic (add, subtract etc) and logic (AND, OR, NOT etc) operations to be carried out.

Control Unit (CU)

The control unit controls the operation of the computer’s ALU, memory and input/output devices, telling them how to respond to the program instructions it has just read and interpreted from the memory unit.

The control unit also provides the timing and control signals required by other computer components.

Buses

Buses are the means by which data is transmitted from one part of a computer to another, connecting all major internal components to the CPU and memory.

A standard CPU system bus is comprised of a control bus,data bus and address bus. 

Address BusCarries the addresses of data (but not the data) between the processor and memory
Data BusCarries data between the processor, the memory unit and the input/output devices
Control BusCarries control signals/commands from the CPU (and status signals from other devices) in order to control and coordinate all the activities within the computer

Memory Unit

The memory unit consists of RAM, sometimes referred to as primary or main memory.  Unlike a hard drive (secondary memory), this memory is fast and also directly accessible by the CPU.

RAM is split into partitions.  Each partition consists of an address and its contents (both in binary form).

The address will uniquely identify every location in the memory.

Loading data from permanent memory (hard drive), into the faster and directly accessible temporary memory (RAM), allows the CPU to operate much quicker.

 

 

Friday, February 16, 2024

Digital Counter


A Digital Counter is obtained by arranging the flip-flops. These are the applications of flip-flops. Other than counting, these are used for measuring the frequency as well as time. These are used to increase the addresses in memory. The operation of these devices depends on the single clock applied.  These are made of flip-fops as basic elements. There are two states included in the flip-flops. The high state is represented by 1 and the low state by 0. The operation of the counter can be made possible by high state-driven flip-flops. Counters consist of modes that are represented by the number of countable states, for example a mod-8 counter. In this, the number of states countable is from 000 to 111 (that is 0 to 7). Hence eight countable states name the counter as a mod-8 counter.

What is Digital Counter?

Definition: The circuit is designed with digital logic to obtain information about the number of events that occurred. This type of digital logic device can be defined as a Counter. The design of counters can be achieved by following various steps.

  1. The number of Flip-Flops based on the requirement.
  2. Accordingly, the State diagrams/ Excitation Tables are drawn.
  3. Further, the expressions are minimized using various techniques.
  4. Finally, the logic diagram is designed.

The above steps are especially followed fro the design of the type of counter known as Synchronous Counters.

Types of Digital Counters

The interconnection of the flip-flops results in the classification of the counters.  Although the single clock signal applied to the counters. There is a difference among the operation based on a single cock applied to the flip-flops in the circuit or the signal applied to the main flip-flop.

The types of counters are:

  1. Asynchronous Counters
  2. Synchronous Counters

The asynchronous counters are also referred to as Ripple counters. The simplest in design among the other counters is the ripple counter. The least quantity of hardware is required for this counter. The flip of one stage reflects the flip in another stage in asynchronous counters. These counters are further described as ‘Serial Counters’.

But in the other type of counter called synchronous counters, each flip-flop in the circuit gets triggered with the same clock at the same time. This is possible by connecting each flip-flop clock line with a single clock. The operation occurred in such types of circuits will be in coordination or synchronization with all the flip-flops present.  Hence these are referred to as Synchronous Counters.

Based on the clock signal applied the counters are classified as synchronous and asynchronous counters. In the Asynchronous type, only the first flip-flop is provided by the main cock. the remaining flip-flops are powered with the output obtained in the previous stage of flip-flops. There is another category of counters referred to as Decade Counters. This counter is able to count the pulses for ten values. The counting is done from 0 to 9.  Even this counting can be extended to 15 states.

What is the difference between Synchronous and Asynchronous Counters?

Based on the connections and the clock applied to the flip-flops there are certain differences between Synchronous and Asynchronous counters.  Some of the differences are listed as follows:

 

Asynchronous Counters

Synchronous Counters
 

 

1. In this counter, the main clock is applied to the first flip-flop. Whereas the other flip-flops are provided with the clock from the output of previous stage flip-flops.

 

 

1. The arrangement of the flip-flops in this counter is driven by the same clock.

 

 

2. The clock is not simultaneous for all the flip-flops in the circuit.

 

 

 

2. The clock is simultaneously provided for all the flip-fops.

 

 

3. To the more number of states, the design of this counter is simple to implement.

 

 

3. In this counter, as the number of states is increasing the design tends to become complex.

 

 

4. The propagation delay is more as the counters are not in sync.

 

 

4. The propagation delay will be less in comparison to the asynchronous counters because of the sync among the flip-flops.

In comparison to the asynchronous counters, the operation will be fast in synchronous counters. The frequency required for operation in the synchronous counters is high. In terms of cost, it is low in asynchronous counters.

Digital Counter Applications

These counter circuits are the basic ones in the ‘Digital Electronics’. These counters possess various applications.

  1. In the conversions from Analog to Digital, these counters are used.
  2.   In the applications of Timers for example Washings machines where we set the time. These counters are used.
  3. With the help of these counters, a ‘Digital Triangular Wave Generator’ can be designed.
  4. In the application of ‘Digital Clock’ counters are used.
  5. A practical example of these devices is seen in the malls, stadiums, or the auditoriums. In the above situations to keep the data on the number of persons. This can be made possible or it will become simple because of these counters

Network Layer

The Network Layer is the third layer of the OSI model. It handles the service requests from the transport layer and further forw...