8/28/21

What is Computer? History of Computer.

Image Source:- Quora


Hey Friends in today's era, computers or laptops are the basic components which are used normally in all the workplaces such as schools, colleges, hospitals, laboratories, companies, etc. Today Computer is the basic thing in our day to day life. Human life has become very easier with computers. Because you can do your work within second with the help of computer and internet. Such as sending an important file to someone. Just open your laptop and mail the document within seconds.  So today we are going to discuss computers and their different types. And also the basic computer required for computers. So Let’s Begin…

What is Computer? 

Many people use a computer daily for some work. But do you know about computers? what is a computer? I bet many people didn’t know about it. So Basically, A Computer is a programmable electronic device, which is used to perform mathematically or logically operations. A user input data through any input device after that a set of instruction process and provide the result of it as “Output”.

A Computer can process arithmetical as well as logical calculations. Arithmetically operation such as +,-,/,* etc and logical operations are  a>b, a<b, a>=b, etc. These operations are processed by a set of instruction written on it. 

In simple words, A computer is an electronic device that accepts data as input and processes it, and gives the result of that input as output. 

Father of Computer and The first computer

Do You know that the father of computers is Charles Babbage. Because it is believed that the first computer was invented by him. Analytical Engine is considered as the first computer which is invented by Charles Babbage was first described in 1837

From an Electronic Device to Computer.


Now let all these aside and tell me that do you know how an electronic device gets the name computer?

The term Computer is derived from the Latin word “Computare” which means calculate.


So that is for today guys we will be back soon with another tutorial. Keep learning with mad about computer. You can also check more information about computers. Click Here For More


Continue Reading →

8/12/21

What is Address Bus, Data Bus & Control Bus in Computer?



If you’re reading this tutorial by skipping the previous tutorial then I strongly recommended to you to learn first previous tutorial. In the Previous tutorial, we had discussed the basic concept of Buses. We can also say that previous tutorial is introduction tutorial about buses…

Let’s come on topic…Today I am going too described Address Bus, Data Bus, and Control Bus.

What is the Address Bus?

The address bus is used by the CPU to send the address of the memory location or the input/output port that is to be accessed at the instant. It is a unidirectional bus i.e. the address can be transferred in one direction only and that is form CPU to the required port or location.

Whether it is a read operation or write operation the CPU calculates the address of the required data and sends it on the data bus for the execution of the required operation. The maximum number of memory locations that can be accessed in a system is determined by the number of lines of an address bus.

An address bus of n lines can be addressed at the most 2n locations directly. Thus a 16-bit address bus can allow access 2 16 bit or 64 K Byte of memory.

People Also Read:- What is an Application Software? And It's Need.
People Also Read:- What is Software Engineering? About Carrier.

What is Data Bus?

A data bus is used to carry the data and instructions from the CPU to memory and peripheral devices and vice versa. Thus it is a bidirectional bus. It is one of most important parts of the connections to the CPU because every program instruction and every byte of data must travel across the bus at some point.

The size of the data bus is measured in bits. The data bus size has much influence on the computer architecture because the important parameters of it like word size, the quantum of data etc. are determined and manipulated by the size of the data bus.

Generally, a microprocessor is called n-bit processors. Thus as the CPU became more advanced, the data bus grew in size. A 64-bit data bus can transfer 8 bytes in every bus cycle and thus its speed is much faster as compared to the 8-bit processor that can transfer one byte in every bus cycle.

What is a Control Bus?

A control bus contains various individual lines carrying synchronizing signals that are used to control. Various peripheral devices connected to the CPU. The common signals that are transferred to the control bus from CPU to devices and vice versa are memory read, memory writes, I/O read, I/O write etc.

Signals are designed, keeping in mind, the design philosophy of the microprocessor and the requirement of the various devices connected to the CPU. So different types of the microprocessor have different control signals. See Below for better understanding.

Image Source Book

Hopefully, you guys did still find this information is useful for you. If you have any doubt or question about this tutorial then let me know through your comment. And don’t forget to share with other computer lovers.
Have a Good Day!!!
People Also Read:- Principal of Software Engineering.
People Also Read:- What is System Software? Best Explanation.

Continue Reading →

8/11/21

CSS Position Properties :- CSS Tutorials

CSS Position

The CSS Position Property is used to position any Html element before or after any Html element you want. You can place Html element anywhere you want. You can set the position of Html element by using top, bottom, left, right properties. This property is used when you set the position property of the element first. 

Basically, The CSS Position property has 4 basic Parts:- 

  • CSS Static Positioning
  • CSS Fixed Positioning
  • CSS Absolute Positioning
  • CSS Relative Positioning

CSS STATIC POSITIONING

This is by default the position of the Html element. They appear normally on your web pages. They didn’t affect any positioning on your webpage. 

CSS Fixed Positioning

This property is used to fix the position of the Html element on your web pages. When you apply this property to the Html element they fixed their position. It doesn’t move even you scroll your window screen. Let see an example to clear this property. 

Example:-

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Position in CSS </title>

</head>
<style>
    div{
        border2px solid black;
        height320px;
        width420px;
        marginauto;
        overflowscroll;
    }
    h1{
        colorred;
        positionfixed;
        left320px;
    }
</style>
<body>
    <div>
        <h1> Tokyo Olympics 2020</h1>
        <p>Lorem ipsum, dolor s elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, doicing elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor sit asicing elit. Cobo eveniet repellat?</p>
        <p>Lorem ipsum, dog elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor sit amet g elit. Corpori eveniet repellat?</p>
        <p>Lorem ipsum, dolor sit ameorporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor sit amet  Corporis explicabo eveniet repellat?</p>
    </div>
</body>
</html>

Output :- 


CSS Relative Property 

The relative positioning property is used to set the element relative to its normal position. 

Example:-

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Position in CSS </title>

</head>
<style>
   
    h1{
        colorred;
        positionrelative;
       
    }
</style>
<body>
    <div>
        <h1> Tokyo Olympics 2020</h1>
        <p>Lorem ipsupisicing elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum,adipisicing elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, adipisicing elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor elit. Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor sit . Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor  Corporis explicabo eveniet repellat?</p>
        <p>Lorem ipsum, dolor  Corporis explicabo eveniet repellat?</p>
    </div>
</body>
</html>

Output:-

CSS Absolute Positioning

In this property, the position is relative to its first position. In other words, It is positioned relative to its closest positioned ancestor. Let’s see through an example below:- 

Example:-

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Position in CSS </title>

</head>
<style>
    body{
        background-colorlightblue;
    }
   h2{
       positionabsolute;
       background-colorlightcoral;
       colorblue;
       top200px;
       left100px;
   }
   h3{
       coloryellow;
       background-colorcornflowerblue;
   }
    h1{
        colorred;
        background-colorcornsilk;
        positionabsolute;
        top250px;
        left300px;
       
    }
</style>
<body>
   <p> It started from top left cornor. </p> 
   <h3> This is a heading without positioning.</h3>
    <h1> This is a Heading 1. </h1>
    <h2> This is a Heading 2. </h2>
</body>

</html> 

Output :- 


Continue Reading →

8/4/21

CSS Fonts Properties :- CSS Tutorials

Hey Friends, Today we are going to discuss CSS fonts. But before starting the article, I have to clear a thing that, font is part of both Html and CSS. In Html, we just placed our font and after it, we apply the property of the font using CSS. In a website, font played a very important role to look your website more beautiful and stylish.  So let’s started our today’s topic CSS Fonts.

CSS Fonts

CSS Fonts property is used to control the texture of your website. By using this property you can change anything of your font just like text, font-family, bold, italic, color, and many more thing. We can see these properties one by one in the below examples. But before it lets me cover some important font attributes. These are listed below:- 

  • CSS Font Color
  • CSS Font Family
  • CSS Font Weight
  • CSS Font Style
  • CSS Font Size

CSS Font Color

This Font CSS Property is used to change the color of the text of your web pages. You can change the text color in three different ways. These different ways are:- 

  • By Color Name
  • By Hexadecimal Value
  • By RGB Value

In the above example, we define all 3 ways to change text color.

 Example:-

<html>
<head>

</head>
<style>
    h1{
        colorred;
    }
    h2{
      color:  rgb(12398235);
    }
    h3{
        color#33FFDA;
    }

</style>
<body>
    <h1> This is Heading Number 1. </h1>

    <h2> This is Heading Number 2.</h2>

    <h3> This is Heading Number 3. </h3>
</body>
</html>

Output:-


CSS Font Family

This font CSS property is used to change the font of your web pages. You can provide any type of value to it. Just like: - Arial, Times New Roman, Monospace, Arial Bold, etc.  

Example:-

<html>
<head> 
</head>
<style>
    h1 {
        font-familysans-serif;
    }

    h2 {
        font-familyArial Impact, Haettenschweiler, 'Arial Narrow Bold'sans-serif;
    }

    h3 {
        font-familyImpact;
    }
</style>

<body>
    <h1> This is Heading Number 1. </h1>

    <h2> This is Heading Number 2.</h2>

    <h3> This is Heading Number 3. </h3>
</body>

</html>

Output:- 

CSS Font Weight

This Font Property is defined. how bold your text is. There are some different values by applying it you can change the font-weight accordingly to you. You can also use some predefined values such as Bold, Normal, Bolder, Light, etc.

Example:-

<html>
<head>
<title> This is title. </title>
</head>

<body>
  <p style="font-weight: lighter;"> This is 1st Paragraph. </p>
  <p style="font-weight: bolder;"> This is 2nd Paragraph. </p>
  <p style="font-weight: 800;"> This is 3rd paragraph. </p>
</body>
</html> 

Output:-


CSS Font Style

This property defines that how your text will appear on your webpage. It may be normal, bold, italic, oblique, etc. 

Example:-

<html>
<head>
<title> This is title. </title>
</head>
<style>
    #para1{
        font-styleitalic;
    }
    #para2{
        font-stylenormal;
    }
    #para3{
        font-styleoblique;
    }
</style>
<body>
  <p id = "para1"> This is 1st Paragraph. </p>
  <p id = "para2"> This is 2nd Paragraph. </p>
  <p id = "para3"> This is 3rd paragraph. </p>
</body>
</html>

Output:-


CSS Font Size

It define the size of the font appear on your webpages. It should be small, normal, medium, large. 

Example:-
<html>
<head>
<title> This is title. </title>
</head>

<body>
    <p style="font-size:small;">  This font size is small</p> 
    <p style="font-size:large;">  This font size is large. </p> 
    <p style="font-size:200%;">  This font size is set on 200%. </p>  
</body>
</html>

Output :-


People Also Read :- CSS Padding Property

Continue Reading →

7/6/21

CSS Padding Properties :- CSS Tutorials

CSS PADDING

CSS Padding Property is used to give some space between the element content and element border. Just like margin you can provide the padding from the top, bottom, left, right, etc. You can independently apply padding on the element using separate properties.  And you can also apply padding property at once by using shorthand property. 

But, Padding and margin property both are different from each other. The difference between margin and padding was the margin property would have applied outside the element. But the padding property would have applied inside the element.

CSS Padding Properties

  1. Padding: - This property is used to set padding in one declaration. 
  2. Padding-top: - This property is used to set padding at the top. 
  3. Padding-right: - It is used to set the padding from the right side of the element. 
  4. Padding-bottom: - It is used to set the padding from the bottom of the element. 
  5. Padding-left: - This property was applied from the left side of the element. 

CSS Padding Values

The Value of padding can be set in Four ways: -

  1. Length: - It Specifies padding in px, pt, cm etc.    
  2. % (percentage): - It define padding in % percentages
  3. Initial: - It set the padding at default values.
  4. Inherit: - It inherits padding from its parent elements

Example: - 

<!DOCTYPE html>
<html>

<head>
    <style>
        .container {
            displayflex;
        }

        #first,
        #second {
            border2px solid red;
            width30%;
            height120px;
            /* padding: 23px 23px 23px 23px; */
            margin23px;
        }
    </style>
</head>

<body>

    <h1> Padding Property </h1>

    <div class="container">
<p id="first"><b> This is First Paragraph.</b><br><br> Lorem ipsum, dolor
 sit amet consectetur adipisicing elit.
Assumenda libero impedit omnis voluptatibus, in neque 
nulla sed quis voluptatum repellat! Hic, cumque vero!</p>
        
<p id="second"> <b> This is Second paragraph.</b><br><br> lsdjlajsdljaldsj
asdjflasjdflajsdlfjasldfjlas dflads flaskdj fl asdjflkasd flasdjflkasd 
jflkasdjfil asdflkasdjf jdlasd flsad flkasdjf lasdfj lasdf alskdjfalsk dfjlaksd
faslkdfj alskdfjlaksd jflasdjflk .</p>
   
 </div>

</body>

</html>

Ouput: -

Without Padding

With Padding


Continue Reading →

7/2/21

Introduction of Loop in C Programming Language.

Has it ever happened to you that in C programming you have to print a code of block several times? And you have to write that code again and again. If you write the same thing several times. Then your code will get long, complex, and difficult to read. 

And didn’t want to write the same code again and again. So what is its solution? The Solution is Loop. Loop that statement until the condition is not satisfied. Let’s talk about the loop. What is a loop? How its work? etc. etc. 

Introduction of Loop

The Loop is used to execute a statement until the condition of the code is not satisfy. In simple words, a loop provides us to execute a group of statements or multiple instructions multiple times. For Example, if you have to print 1-10 numbers then instead of using printf statement 10 times, we can use printf inside the loop which runs up to 10 iterations.

Advantages of Loop

  1. The first and main thing of the loop is we didn’t write the same code again and again.
  2. Reduce the length of the code. 
  3. The Code is readable. And easy to understand.
  4. It provides the code reusability. 
  5. Loop takes less memory space comparing (write the code several times)

There are mainly 3 types of loops available in the C programming language. These are:-

  1. While Loop
  2. For Loop
  3. Do-While Loop

Let’s See a simple example of a loop. 

Write a program to print the First 50 natural numbers using the loop.

A natural number is a positive number (counting) so don’t be confused about it.


#include<stdio.h>

int main()
{
    int i;

    for (i=1; i<=50; i++)
    {
        printf("%d \n", i);
    }
    return 0;
}

Output:- 


Look at the length of the code. Using the loop the length of the code is reduced. If we have to print 50 numbers without using a loop then we have to write printf statement 50 times. And think if I said to you that, you have to print 50 lakh numbers. I bet, you are not going to do it at any cost. Writing printf statement 50 lakh times is not an easy job.

Continue Reading →

7/1/21

CSS Opacity Property :- CSS Tutorials

CSS Opacity

The CSS Opacity property is used to specify the transparency of the Html element. In other words, You can also say that it specifies the clarity of the element. 

The Opacity property value takes from 0.0 to 1.0. The lower value, the more transparency. Look at the image below. 
The First Image that you see in the example has 0.2 Opacity. The Second image has 0.5 and the last image has a default value of 1. 

Look at the Code below to understand how its works. 
<!DOCTYPE html>
<html>
<head>
<style>
 
#img1 {

  opacity0.2;

}
#img2{

    opacity0.5;

}
#img3{

    opacity1;

}
</style>
</head>
<body>
 
<h1>Transparent Images</h1>
 
<img id ="img1" src="1.jpg" width="270" height="200">
<img id ="img2" src="2.jpg" width="270" height="200">
<img id ="img3" src="3.jpg" width="270" height="200">
 
</body>
</html>
 

Transparent Boxes 

You can also use the opacity property to transparent the box or text area. Look at the example below.

Example:- 

<!DOCTYPE html>
<html>
<head>
<style>
p
    background-colorchocolate;
    padding10px;
}
#p1 {
  opacity1;
}
#p2{
    opacity0.5;
}
#p3{
    opacity0.2;
}
</style>
</head>
<body>

<h1>Transparent Boxes</h1>

<p id = "p1"> Opacity 1</p>
<p id = "p2"> Opacity 0.5</p>
<p id = "p3"> Opacity 0.2</p>


</body>
</html>

Output :-

Apply Hover Effect Using Opacity

You can also hover over the image in the form of opacity. Let's Try it 

<!DOCTYPE html>
<html>
<head>
<style>
img:hover{
    opacity0.5;
}
</style>
</head>
<body>

<h1> Hover Property </h1>

<img id ="img1" src="1.jpg" width="270" height="200">
<img id ="img2" src="2.jpg" width="270" height="200">
<img id ="img3" src="3.jpg" width="270" height="200">

</body>
</html>

Ouput :-

Before Hover 

After Hover

That's All of today guys hope you all understand this opacity property very well. If you have any doubt comment below we will definitely try to solve it. 
Continue Reading →

6/28/21

C Switch Statement in C Programming Language.

In this tutorial, we are going to learn about Switch Statement in the C programming language. We have already seen if, if-else, nested if-else, condition, etc. If you haven’t read those tutorials then first go and read those tutorials then read them. 

Topics that cover today.

  1. C switch statement
  2. C Switch Syntax
  3. Flow chart of C Switch Statement
  4. Example of C switch statements

So let’s go with our today’s topic. 

C Switch Statement

The C switch statement is used to execute a code block among many alternatives statements. The Switch statement allows the variable to be tested with the statement( Values) also known as Case written in the switch statement and if the statement is verified(true) with a statement then the code written between that statement will execute and then the rest of the code will start executing.

The same thing is also done by the if-else condition. But the syntax of the switch condition is easier to read and understandable for the programmers.

C Switch Statements Syntax.

switch (expression)

{
    case constant-expression1 :

    statements;
    break;                      /* The break function is optional  */
 
    case constant-expression1 :

    statements;
    break

 
    .
    .
    .
    .
     default:

     default statements;

}

Note: - The Break statement in the switch is not compulsory (optional) to add to the program. If the programmer wanted to execute the default statement then the break statement is not added to the program.

If none of the statements matched with the expression then by default statement is automatically displayed on the output screen.

Flow chart of the Switch Statement

Example of Switch Statement

Program to find whether a number is even, odd or negative.

#include<stdio.h>
int main()

{
  int number;

 
  printf("Enter a number: ");

  scanf("%d",&number);

 
  switch( number%2 )

  {
    case 0:

      printf("%d is even.", number);

      break;

    case 1:

      printf("%d is odd.", number);

      break;

    default:

        printf("Sorry...Number is Negative");

  }
 
  return 0;

}

Output:-




People Also Read : Nested IF-Else in C Programming

People Also Read : C Instruction With Example in C Language.

Continue Reading →

Follow on Twitter

Linkedin

Categories

Mad About Computer. Powered by Blogger.
This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.