In this topic we shall understand about what a micro architecture is and how it is useful in designing a highly scalable system. So before learning about Micro Architecture, we shall first understand why Micro Architecture came into existence and how it is useful for the …
Note: Before starting reading this chapter, let us be clear about below things: 1. System design is a very vast topic, and covering every aspect is impossible. 2. This chapter should be treated as a “getting started” or “introduction” to system design. We go through most …
Addition using bitwise operators: XOR (^) operation will give us addition of 2 bits. Carry bit can be obtained by performing AND(&) operation. Finally, to get the final result, we perform (x & y) << 1 and add it to x ^ y to get the …
Given a binary number, return the 1’s and 2’s complement of that number. Before getting into programming, we shall look at how to get 1’s and 2’s complement of a given binary number. 1’s Complement: 1’s complement of a number is achieved by flipping all the …
Given an array that is not sorted. Find the largest sum that is made by adding the elements in the array that are contiguous. Input: , Output: 6 Explanation: has the largest sum = 6. Method 1: Dynamic Programming: In this method we take 2 new …
So this is the final chapter for shell script tutorial. If you have followed and executed all the above programming examples, you might have stumbled upon many errors. Some errors are easy to fix; some take hours to check where the exact issue is. In this …
Most of the times, shell script is used to interact with files. File Example 1: Below is a program to check if a file exists or not In this example, we take file name input from the user. Note the “\c” option, this is used to …
In this chapter we shall look at how to perform various arithmetic operations. 8.1 Arithmetic addition 8.2 Performing operations on floating or decimal numbers. 8.3 Performing complex math operations 8.1 Arithmetic addition: Simple way to add two numbers is given below: #!/bin/bash echo 1+2 Output: 1+2 …