Friday, February 27, 2026

Binary Arithmetic



Binary arithmetic is essential part of all the digital computers and many other digital system.

Binary Addition

Binary addition is the easiest of the processes to perform. As you'll see with the other operations below, it is essentially the same way you learnt to do addition of decimal numbers by hand (probably many years ago in your early school years). The process is actually easier with binary as we only have 2 digits to worry about, 0 and 1.

The process is that we line the two numbers up (one under the other), then, starting at the far right, add each column, recording the result and possible carry as we go.

Here are the possibilities:

  • 0 + 0 = 0
  • 1 + 0 = 1
  • 1 + 1 = 2 which is 10 in binary which is 0 with a carry of 1
  • 1 + 1 + 1 (carry) = 3 which is 11 in binary which is 1 with a carry of 1

The carry is involved whenever we have a result larger than 1 (which is the largest amount we may represent with a single binary digit).

Adding more than two numbers

It is possible to add more than 2 binary numbers in one go but it can soon get unweildly managing the carries. My suggestion is that you add the 1st and 2nd numbers together. Then take the result and add the third number to that. Then take the result and add the 4th etc. This way you may add as many binary numbers as you like and the complexity will never increase. It's a little more work but with practice you will get very quick at it.

Binary Multiplication

Binary multiplication is just about as easy as binary addition. Again it is the same process as we would do with decimal multiplication by hand. Again it is easier as binary only has 0 and 1.

We line the two numbers up (similar to addition). Then we multiply the entire top number by each individual digit of the bottom number. As we move across each digit we pad out the result with 0's to line it up. Finally we add all the results together.

Here are the possibilities:

  • 0 * 0 = 0
  • 1 * 0 = 0
  • 1 * 1 = 1

As you have no doubt noticed, the process is fairly straight forward. If the binary digit on the second row we are multiplying by is a 1 then pad out accordingly and write out the top binary number. If the binary digit on the second row we are multiplying by is a 0 then we can just write out 0's.

Binary Subtraction

With binary subtraction we start to get a little more difficult (But not that difficult). Similar to binary addition, we will work through the numbers, column by column, starting on the far right. Instead of carrying forward however, we will borrow backwards (when necessary).

Here are the possibilities:

  • 0 - 0 = 0
  • 1 - 0 = 1
  • 1 - 1 = 0
  • 0 - 1 we can't do so we borrow 1 from the next column. This makes it 10 - 1 which is 1.

Another approach

The above example is the most convenient way for us to do binary subtraction by hand. There is another approach however and this is the way that computers subtract binary digits. This approach is called Two's Complement.

Let's say we want to compute 1000 ( 8 ) - 11 ( 3 ).

  • Step 1: Write the equation out, padding the bottom number with 0's
    1000
    0011 -
  • Step 2: Invert the digits of the lower number
    1000
    1100
  • Step 3: Add 1 to the lower number
    1000
    1101
  • Step 4: Add those two numbers together to get 10101
  • Step 5: Remove the leading 1 (and any 0's after it). You are left with 101 ( 5 ).

Binary Division

Binary division is probably the most difficult of the binary equations. Fortunately, it is also made easier by the fact we only have to deal with 1's and 0's.

First off, some terminology. The number we are dividing by is the divisor. The number we are dividing into is the dividend.

The process is as follows:

  • Step 1: Create the working portion of the dividend. Starting at the right, keep including digits until we have a number that the divisor will go into.
  • Step 2: Work out how many times the divisor goes into the working portion (with binary this is easy as it will always be 1). Write this number above the line (in line with the far right digit of the working number).
  • Step 3: Subtract the divisor from the working number. This becomes the beginning of the new working number.
  • Step 4: Bring down digits from the dividend and add to the new working number until we have a new working number large enough for the divisor to go into.
  • Step 5: Repeat steps 2 to 4 until we are at the end of the dividend.
  • Step 6: The result of the final subtraction is the remainder.

 

Thursday, February 26, 2026

Binary Codes


In the coding, when numbers, letters or words are represented by a specific group of symbols, it is said that the number, letter or word is being encoded. The group of symbols is called as a code. The digital data is represented, stored and transmitted as group of binary bits. This group is also called as binary code. The binary code is represented by the number as well as alphanumeric letter.

Advantages of Binary Code

Following is the list of advantages that binary code offers.

  • Binary codes are suitable for the computer applications.

  • Binary codes are suitable for the digital communications.

  • Binary codes make the analysis and designing of digital circuits if we use the binary codes.

  • Since only 0 & 1 are being used, implementation becomes easy.

Classification of binary codes

The codes are broadly categorized into following four categories.

  • Weighted Codes
  • Non-Weighted Codes
  • Binary Coded Decimal Code
  • Alphanumeric Codes
  • Error Detecting Codes
  • Error Correcting Codes

Weighted Codes

Weighted binary codes are those binary codes which obey the positional weight principle. Each position of the number represents a specific weight. Several systems of the codes are used to express the decimal digits 0 through 9. In these codes each decimal digit is represented by a group of four bits.

Non-Weighted Codes

In this type of binary codes, the positional weights are not assigned. The examples of non-weighted codes are Excess-3 code and Gray code.

Excess-3 code

The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express decimal numbers. The Excess-3 code words are derived from the 8421 BCD code words adding (0011)2 or (3)10 to each code word in 8421. The excess-3 codes are obtained as follows −

Excess-3 code

Gray Code

It is the non-weighted code and it is not arithmetic codes. That means there are no specific weights assigned to the bit position. It has a very special feature that, only one bit will change each time the decimal number is incremented as shown in fig. As only one bit changes at a time, the gray code is called as a unit distance code. The gray code is a cyclic code. Gray code cannot be used for arithmetic operation.

Application of Gray code

  • Gray code is popularly used in the shaft position encoders.

  • A shaft position encoder produces a code word which represents the angular position of the shaft.

Binary Coded Decimal (BCD) code

In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to express each of the decimal digits with a binary code. In the BCD, with four bits we can represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to 1001). The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.

Advantages of BCD Codes

  • It is very similar to decimal system.
  • We need to remember binary equivalent of decimal numbers 0 to 9 only.

Disadvantages of BCD Codes

  • The addition and subtraction of BCD have different rules.

  • The BCD arithmetic is little more complicated.

  • BCD needs more number of bits than binary to represent the decimal number. So BCD is less efficient than binary.

Alphanumeric codes

A binary digit or bit can represent only two symbols as it has only two states '0' or '1'. But this is not enough for communication between two computers because there we need many more symbols for communication. These symbols are required to represent 26 alphabets with capital and small letters, numbers from 0 to 9, punctuation marks and other symbols.

The alphanumeric codes are the codes that represent numbers and alphabetic characters. Mostly such codes also represent other characters such as symbol and various instructions necessary for conveying information. An alphanumeric code should at least represent 10 digits and 26 letters of alphabet i.e. total 36 items. The following three alphanumeric codes are very commonly used for the data representation.

  • American Standard Code for Information Interchange (ASCII).
  • Extended Binary Coded Decimal Interchange Code (EBCDIC).
  • Five bit Baudot Code.

ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more commonly used worldwide while EBCDIC is used primarily in large IBM computers.

Error Codes

There are binary code techniques available to detect and correct data during data transmission.

Error CodeDescription

Error Detection and Error Correction

Error detection and correction code technique

Wednesday, February 25, 2026

Computer System Organization



A digital computer consists of an interconnected system of processors, memories, and input/output devices. Processors, memories, and input/output are key concepts and will be present at every level, so we will start to study computer architecture by looking at all three in turn.

PROCESSORS

The CPU (Central Processing Unit) is the ‘‘brain’’ of the computer.

A central processing unit (CPU) is the electronic circuitry within a computer that carries out the instructions  of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions. The computer industry has used the term “central processing unit” at least since the early 1960s.Traditionally, the term “CPU” refers to a processor, more specifically to its processing unit and control unit (CU), distinguishing these core elements of a computer from external components such as main memory and I/O circuitry.

The CPU is composed of several distinct parts. The control unit is responsible for fetching instructions from the main memory and determining their type. The arithmetic logic unit performs operations such as addition and Boolean AND needed to carry out the instructions.

The CPU also contains a small, high-speed memory used to store temporary results and certain control information. This memory is made up of a number of registers, each of which has a certain size and function. Usually, all the registers have the same size. Each register can hold one number, up to some maximum determined by the size of the register. Registers can be read and written at high speed since they are internal to the CPU. The most important register is the Program Counter (PC), which points to the next instruction to be fetched for execution. ( The name ‘‘program counter’’ is somewhat misleading because it has nothing to do with counting anything, but the term is universally used. Also important is the Instruction Register (IR), which holds the instruction currently being executed. ( Most computers have numerous other registers as well, some of the general-purpose as well as some for specific purposes.

What is the,,bus,,?

In computer architecture, a bus is a communication system that transfers data between components inside a computer, or between computers. This expression covers all related hardware components (wire, optical fiber, etc.) and software, including communication protocols.

Early computer buses were parallel electrical wires with multiple hardware connections, but the term is now used for any physical arrangement that provides the same logical function as a parallel electrical bus. Modern computer buses can use both parallel and bit-serial connections and can be wired in either a multi-drop(electrical parallel) or daisy chain topology, or connected by switched hubs, as in the case of USB.

CPU Organization

  • A system bus is a link that connects every segment of a system to the central storage and carries out the data transfer in them.
  • It is a pathway composed of cables and connectors which is used to carry data between a computer microprocessor and the main memory.
  • It provides a communication path for the data and control signals moving between the major components of the computer system.

The types of system buses are

1. Data

  • These are the pieces of information that are to be transferred.
  • The data is transferred between peripherals, memory and the CPU. The data bus can be a very busy pathway.

2. Address

  • It stores information about where the data is to be transferred.
  • The components pass memory addresses to one another over the address bus.

3. Control

  • These are the set of instructions regarding what to do with the data.
  • It is used to send out signals to coordinate and manage the activities of the motherboard components.

Characteristics of a System Bus

1. Bus Width

  • The size of a bus also known as its width.
  • It determines how much data can be transferred at a time.
  • This refers to the amount of information that can be transferred once.

2. Bus Speed

  • This refers to the no. of bits or bytes the bus can send per unit time.
  • It is also defined by its frequency. Frequency means that the number of data packets sent or received per second. Each time that data is sent or received is called a cycle.

The system bus combines the functions of the three main buses, namely Control Bus, Address Bus, Data Bus. The control bus carries the control, timing and coordination signals to manage the various functions across the system. The address bus is used to specify memory locations for the data being transferred.

The data bus, which is a bidirectional path. It carries the actual data between the processor (CPU), the memory and the peripherals (Input and Output). The system bus architecture varies from system to system and can be specific to a particular computer design. The other common characteristics of system buses are based on the primary role, connecting devices internally or externally, etc.

Internal Bus

  • It is also known as an internal data bus, a memory bus, a system bus or Front-Side-Bus.
  • It connects all the internal components of a computer, such as CPU and memory, to the motherboard.
  • Internal data buses are also referred to as a local bus because they are intended to connect to local devices.
  • This bus is quick and independent of the rest of the computer operations.

External Bus

  • It is also known as an expansion bus.
  • It is made up of the electronic pathways that connect the different external devices, such as a printer, etc.

Cache Function

A CPU cache is a hardware cache used by the central processing unit (CPU) of a computer to reduce the average cost (time or energy) to access data from the main memory. A cache is a smaller, faster memory, closer to a processor core, which stores copies of the data from frequently used main memory locations. Most CPUs have different independent caches, including instruction and data caches, where the data cache is usually organized as a hierarchy of more cache levels (L1, L2, etc.).

All modern (fast) CPUs (with few specialized exceptions) have multiple levels of CPU caches. The first CPUs that used a cache had only one level of cache; unlike later level 1 caches, it was not split into L1d (for data) and L1i (for instructions). Almost all current CPUs with caches have a split L1 cache. They also have L2 caches and, for larger processors, L3 caches as well. The L2 cache is usually not split and acts as a common repository for the already split L1 cache. Every core of a multi-core processor has a dedicated L2 cache and is usually not shared between the cores. The L3 cache, and higher-level caches, are shared between the cores and are not split. An L4 cache is currently uncommon and is generally on dynamic random access memory (DRAM), rather than on static random access memory (SRAM), on a separate die or chip. That was also the case historically with L1, while bigger chips have allowed integration of it and generally all cache levels, with the possible exception of the last level. Each extra level of cache tends to be bigger and be optimized differently.

Other types of caches exist (that are not counted towards the “cache size” of the most important caches mentioned above), such as the translation look aside buffer (TLB) that is part of the memory management unit (MMU) that most CPUs have.

Caches are generally sized in powers of two: 4, 8, 16 etc. KiB or MiB(for larger non-L1) sizes, although the IBM z13has a 96 KiB L1 instruction cache.

Instruction Execution Cycle

  • This is a process of getting the instruction from the memory, decoding it to the machine language and executing it. So, three basic steps of the cycle are:

Fetch the instruction.
Decode it.
Execute.

  • The whole process of fetching the instructions from the memory, decoding it to the machine language and executing it, is termed as an instruction cycle.

PRIMARY MEMORY

The memory is that part of the computer where programs and data are stored. Some computer scientists (especially British ones) use the term store or storage rather than memory, although more and more, the term ‘‘storage’’ is used to refer to disk storage. Without a memory from which the processors can read and write information, there would be no stored-program digital computers.

Bits

The basic unit of memory is the binary digit, called a bit. A bit may contain a 0 or a 1. It is the simplest possible unit. (A device capable of storing only zeros could hardly form the basis of a memory system; at least two values are needed.) People often say that computers use binary arithmetic because it is ‘‘efficient.’’ What they mean (although they rarely realize it) is that digital information can be stored by distinguishing between different values of some continuous physical quantity, such as voltage or current. The more values that must be distinguished, the less separation between adjacent values, and the less reliable the memory. The binary number system requires only two values to be distinguished. Consequently, it is the most reliable method for encoding digital information.

Memory Addresses

In computing, a memory address is a reference to a specific memory location used at various levels by software and hardware. Memory addresses are fixed-length sequences of digits conventionally displayed and manipulated as unsigned integers.Such numerical semantic bases itself upon features of CPU (such as the instruction pointer and incremental address registers), as well upon the use of the memory like an array endorsed by various programming languages.

 

 

Tuesday, February 24, 2026

Microprocessor


The microprocessor is the central unit of a computer system that performs arithmetic and logic operations, which generally include adding, subtracting, transferring numbers from one area to another, and comparing two numbers. It's often known simply as a processor, a central processing unit, or as a logic chip. It's essentially the engine or the brain of the computer that goes into motion when the computer is switched on. It's a programmable, multipurpose device that incorporates the functions of a CPU (central processing unit) on a single IC (integrated circuit).

Working

A microprocessor accepts binary data as input, processes that data, and then provides output based on the instructions stored in the memory. The data is processed using the microprocessor's ALU (arithmetical and logical unit), control unit, and a register array. The register array processes the data via a number of registers that act as temporary fast access memory locations. The flow of instructions and data through the system is managed by the control unit.

Benefits of a Microprocessor

But computer systems aren't the only devices that use microprocessors. Everything from smartphones to household appliances to cars use microprocessors these days. Here are a few reasons why microprocessors are so widely used:

  • They don't cost a lot - Due to their use of IC technology, microprocessors don't cost much to produce. This means that the use of microprocessors can greatly reduce the cost of the system it's used in.

  • They are fast - The technology used to produce modern microprocessors has allowed them to operate at incredibly high speeds--today's microprocessors can execute millions of instructions per second.

  • They consume little power - Power consumption is much lower than other types of processors since microprocessors are manufactured using metal oxide semiconductor technology. This makes devices equipped with microprocessors much more energy efficient.

  • They are portable - Due to how small microprocessors are and that they don't consume a lot of power, devices using microprocessors can be designed to be portable (like smartphones).

  • They are reliable - Because semiconductor technology is used in the production of microprocessors, their failure rate is extremely low.

  • They are versatile - The same microprocessor chip can be used for numerous applications as long as the programming is changed, making it incredibly versatile.

Categories of Microprocessors

Microprocessors can be classified in different categories, as follows:.

Based on Word Length

Microprocessors can be based on the number of bits the processor's internal data bus or the number of bits that it can process at a time (which is known as the word length). Based on its word length, a microprocessor can be classified as 8-bit, 16-bit, 32-bit, and 64-bit.

 

Reduced Instruction Set Computer (RISC)

RISC microprocessors are more general use than those that have a more specific set of instructions. The execution of instructions in a processor requires a special circuit to load and process data. Because RISC microprocessors have fewer instructions, they have simpler circuits, which means they operate faster. Additionally, RISC microprocessors have more registers, use more RAM, and use a fixed number of clock cycles to execute one instruction.

 

Complex Instruction Set Computer

CISC microprocessors are the opposite of RISC microprocessors. Their purpose is to reduce the number of instructions for each program. The number of cycles per instruction is ignored. Because complex instructions are made directly into the hardware, CISC microprocessors are more complex and slower. CISC microprocessors use little RAM, have more transistors, have fewer registers, have numerous clock cycles for each instruction, and have a variety of addressing modes.

 

Special Purpose Processors

Some microprocessors are built to perform specific functions. For example, coprocessors are used in combination with a main processor, while a transputer is a transistor computer: a microprocessor that has its own local memory.

Evolution of Microprocessors

We can categorize the microprocessor according to the generations or according to the size of the microprocessor:

First Generation (4 - bit Microprocessors)

The first generation microprocessors were introduced in the year 1971-1972 by Intel Corporation. It was named Intel 4004 since it was a 4-bit processor.

It was a processor on a single chip. It could perform simple arithmetic and logical operations such as addition, subtraction, Boolean OR and Boolean AND.

I had a control unit capable of performing control functions like fetching an instruction from storage memory, decoding it, and then generating control pulses to execute it.

Second Generation (8 - bit Microprocessor)

The second generation microprocessors were introduced in 1973 again by Intel. It was a first 8 - bit microprocessor which could perform arithmetic and logic operations on 8-bit words. It was Intel 8008, and another improved version was Intel 8088.

Third Generation (16 - bit Microprocessor)

The third generation microprocessors, introduced in 1978 were represented by Intel's 8086, Zilog Z800 and 80286, which were 16 - bit processors with a performance like minicomputers.

Fourth Generation (32 - bit Microprocessors)

Several different companies introduced the 32-bit microprocessors, but the most popular one is the Intel 80386.

Fifth Generation (64 - bit Microprocessors)

From 1995 to now we are in the fifth generation. After 80856, Intel came out with a new processor namely Pentium processor followed by Pentium Pro CPU, which allows multiple CPUs in a single system to achieve multiprocessing.

Other improved 64-bit processors are Celeron, Dual, Quad, Octa Core processors.

Friday, February 20, 2026

Ports



It the connection point acts as interface between the computer and the external devices like: printer, modem, etc.

There are two types of ports :

1. Internal Port 

It connects the system’s motherboard to internal devices like hard-disk, CD drive, internal Bluetooth etc.

2. External Port 

It connects the system’s motherboard to internal devices like mouse, printer, USB etc.

Some important types of ports are as per follows :

1. Serial Port :  

  • Used for external modems and older computer mouse
  • Two versions-9pin,25pin
  • Data travels at 115 kilobits per second

2. Parallel Port :          

  • Used for scanners and printers
  • 25 pin model

3. Universal Serial Bus (USB) Port :

  • It can connect all kinds of external USB devices such as external hard disk, printer, scanner, mouse, keyboard, etc.
  • Data travels at 12 megabits per seconds.

4. Firewire Port :

  • Transfers large amount of data at very fast speed.
  • Connects camcorders and video equipment to the computer.
  • Data travels at 400 to 800 megabits per seconds.

5. Ethernet Port :

  • Connects to a network and high speed Internet.
  • Data travels at 10 megabits to 1000 megabits per seconds depending upon the network bandwidth.

Thursday, February 19, 2026

Domain Specific Tools



Depending upon of its usages, the software may be classified as generic or specific. Generic software is a software that can perform multiple tasks in a different environment without being modified like a word processor software that can be used by anyone to make different types of documents as a report, whitepaper, training material, etc. Specific software is software for a particular application, like railway reservation system, weather forecasting, etc.

Some Domain Specific Tools :

  1. School Management System : School management system handles various activities and processes of a school to facilitate campus management like examination, attendance, admission, student’s fees, timetable, teacher’s training, etc. It provides a healthy interaction among teachers, students, parents.

  2. Inventory Management : Managing multiple tasks like purchase, sales, order, delivery, stock maintenance, etc. associated with raw or processed goods in any business is called inventory management. The inventory management software ensures that stocks are never below specified limits and purchase/deliveries are done in time. Inventory management system is very useful for forecasting, utilizing economies of scale and timing.

  3. Payroll Management System : Payroll management system deals with the financial aspects of the employee’s salary, taking care of leaves, bonus, loans, etc. Some advantages of using this kind of management system are managed employee information efficiently, generate pay-slip at the convenience of a mouse click, manages its own security. Payroll software is generally a component of HR (Human Resource) management software in big organizations.

  4. Financial Accounting : Financial management software keeps an electronic record of all financial transactions of the organization. Objectives of financial accounting

    • Record financial transactions as and when they occur so that the data can be analyzed for preparing a financial statement.

    • Calculate profit or loss, to enable management to take course-correction strategies if required.

    • Ascertain the financial strength of the company by determining its assets and liabilities.

    • Communicate the information to stakeholders through statements and reports, so that these stakeholders can take appropriate decisions on their investments in the business.

  5. Hotel Management :Hotel management software helps hotel managers to keep track of inventory levels, daily orders, customer management, employee scheduling, table booking, etc.

  6. Reservation System :A reservation system is a software that handles multiple modules like train routes, train management, seat booking, meal booking, train maintenance, train status, travel package, etc.

  7. Weather Forecasting System : Weather forecasting system is a real-time software that predicts the weather of a place by collecting live data about atmospheric temperature, humidity, wind level, etc. It is used to predict major disasters like earthquakes, hurricanes, tsunamis, etc.

Friday, February 13, 2026

Secondary Memory



All secondary storage devices which are capable of storing high volume data is referred to secondary memory. It's slower than primary memory. However, it can save a substantial amount of data, in the range of gigabytes to terabytes. This memory is also called backup storage or mass storage media.

Types of Secondary memory

Mass storage devices:

The magnetic disk provides cheap storage and is used for both small and large computer systems.

Two types of magnetic disks are:

  • Floppy disks
  • Hard disks

Flash/SSD

Solid State Drive provides a persistent flash memory. It's very fast compared to Hard Drives. Frequently found in Mobile phones, its rapidly being adopted in PC/Laptop/Mac.

Optical drives:

This secondary storage device is from which data is read and written with the help of lasers. Optical disks can hold data up to 185TB.

Examples

  • CD
  • DVD
  • Blue Ray

USB drives:

It is one of the most popular types of secondary storage device available in the market. USB drives are removable, rewritable and are physically very small. The capacity of USB drives is also increasing significantly as today 1TB pen drive is also available in the market.

Magnetic tape:

It is a serial access storage device which allows us to store a very high volume of data. Usually used for backups.

Characteristic Secondary Memory

  • These are magnetic and optical memories
  • Secondary memory is known as a backup memory
  • It is a non-volatile type of memory
  • Data is stored permanently even when the power of the computer is switched off
  • It helps store data in a computer
  • The machine can run without secondary memory
  • Slower than primary memory

Binary Arithmetic

Binary arithmetic is essential part of all the digital computers and many other digital system. Binary Addition Binary addition ...