Assignment (Theory)
Assignment (Theory)
Generation of computer 04
02 Number System 05
Importance of R 08
Graphical representation 10
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Basic Concepts on Fundamentals of Submission Date:
01 Computer and R Programming 10-02-2025
Concept of Computer:
The word computer comes from ‘compute’, meaning computing or calculating. A computer is
an electronic device that processes data and performs tasks based on instructions from software.
Besides we can say that, a computer is an electronic device used to process data, convert data
into valid information that is useful to people.
Types of software:
There are three types of software in computer. These are-
• Application software: MS Office, R programming, Python, Adobe photoshop etc.
• System software: Microsoft Windows, Mac-OS, Linux, Chrome OS, Unix etc.
• Utility software: Antivirus Software, Backup Software, Task Manager, Firewall
Software, Registry Cleaners, Uninstaller Programs etc.
Components of hardware:
Processor: A processor, also known as a Central Processing Unit (CPU), is the main component
of a computer that carries out instructions, processes data, and executes tasks. It acts as the brain
of the computer, handling all computations and decision-making processes.
CPU: A CPU (Central Processing Unit) is the brain of a computer, responsible for executing
instructions, performing calculations, and processing data. It controls and coordinates all
operations within a computer system.
Memory: Memory is one of the small chips refers to the storage system that holds data and
instructions temporarily or permanently for processing. It allows the computer to quickly access
and retrieve information needed for operations.
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Continued Submission Date:
02 10-02-2025
Types of Memory:
1. Primary Memory (Volatile Memory)
2. Secondary Memory (Non-Volatile Memory)
Take data
Keep data
Memories
Super Computer:
• Large, extremely fast, powerful and expensive
• Use for complex and sophisticated calculations
• Price of this computer is very high
• Example: Cray-11, Cray-T90, Cray-XMP etc
Mainframe Computer:
• Operates with a terminal monitor and keyboard
• Suitable for storing large volume of data
• Use in banking and insurance industry
• Example: IBM 4300, IBM 9672, NCR 8000 etc
Minicomputer:
• Relatively small sized with high processing power
• Largely used as servers on network
• Consist of high speed, huge storage and memory
• Example: IBM 134, DEC PDP8, DEC PDP 11 etc
Workstation:
• More processing power than personal computer
• Consist of bigger high-resolution monitor
• Used by scientist, engineer, graphic designer
• Example: Sun Ultra 60
Microcomputer:
• Widespread, popular and low priced
• Consist of different sizes with different
computational capabilities
• Costly than personal computer
• Example: IBM PC
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Continued Submission Date:
04 10-02-2025
Desktop Computer:
• Single used based computer
• Lower price than workstation
• User friendly than the previous generation
• Less electricity consumed
Laptop Computer:
• Also known as notebook computer
• Consist with LCD monitor, keyboard and touchpad
• Users are students, professors, executives, researchers
Generation of Computers:
First generation (1944-1958):
• These computers were bulky, used great amount of electric power, generated a great
amount of heat and were not reliable.
• It is vacuum tube-based computer
OR Gate:
An OR gate is a basic digital logic gate that outputs true 1 if at least one of its inputs is true 1. It
follows the logical OR operation, meaning the output is false 0 only when all inputs are false 0.
Truth table of OR gate
P Q P+Q
0 0 0
0 1 1
1 0 1
1 1 1
AND Gate:
An AND gate is a fundamental digital logic gate that outputs true 1 only if all its inputs are true
1. If any input is false 0, the output is also false 0. The AND gate is typically represented by a
D-shaped symbol with two or more inputs and one output.
Truth table of AND Gate
P Q PQ
0 0 0
0 1 0
1 0 0
1 1 1
NOT Gate:
A NOT gate, also called an inverter, is a fundamental digital logic gate that outputs the opposite
or complement of its input. If the input is 1 true, the output is 0 false, and vice versa.
Truth table of NOT Gate
P P̅
0 1
1 0
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Continued Submission Date:
07 10-02-2025
NOR Gate:
A NOR gate is formed by connecting a NOT gate at the output of an OR gate. The symbol of
NOR gate made by placing the circle of a NOT gate at the output of an OR gate. A NOR gate
(NOT-OR gate) is a digital logic gate that outputs true 1 only when all inputs are false 0.
Truth table of NOR Gate
P Q X
0 0 1
0 1 0
1 0 0
1 1 0
NAND Gate:
A NAND gate is formed by connecting a NOT gate at the output of a AND gate. The symbol of
NAND gate is obtained by placing the circle of a NOT gate at the output of AND gate. A NAND
gate (NOT-AND gate) is a digital logic gate that outputs false 0 only when all inputs are true 1.
Truth table of NAND Gate
A B X
0 0 1
0 1 1
1 0 1
1 1 0
XOR Gate:
XOR is short for OR. An XOR gate (Exclusive OR gate) is a digital logic gate that outputs true
1 only when the number of true inputs is odd. For a 2-input XOR gate, the output is 1 if the
inputs are different and 0 if the inputs are the same.
Truth table of XOR Gate
P Q X=P⊕Q
0 0 0
0 1 1
1 0 1
1 1 0
XNOR Gate:
If a NOT is attached to the output of an XOR gate, an XNOR gate is formed. XNOR gate
produces an output of 1 when there are even (or zero) number of 1 in the output.
Truth table of XNOR Gate
P Q X
0 0 1
0 1 0
1 0 0
1 1 1
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Continued Submission Date:
08 10-02-2025
An Introduction to R Programming and RStudio:
R is a programming language and software environment for statistical analysis, graphics
representation and reporting. The R programming language is written in C, Fortran and R itself.
It’s an alternative implementation of the S programming language, which was widely used in
the 1980s for statistical computing.
➢ R is a free and open-source scripting language developed by Ross Ihaka and Robert
Gentleman.
➢ It allows integration with Python, C, C++, .Net and Fortran.
On the other hand, RStudio is an integrated development environment (IDE) is a software
application that helps programmers develop software code efficiency. In the simple word, we
can explain RStudio as an integrated development environment (IDE) for R, a programming
language widely used for statistical computing, data analysis, and machine learning. It provides
a user-friendly interface for writing and running R code efficiently.
Importance of R:
• Free & Open Source
• Extensive Libraries for Data Science
• Strong Statistical Capabilities
• Great for Data Visualization
• Seamless Integration with Python, SQL, and Big Data Tools
Installation Must be installed first to run RStudio. Installed separately but requires R to function.
Command-line based; runs in a terminal Graphical interface with a console, script
User Interface
or console. editor, plots, and variable viewer.
Can execute R scripts, but lacks advanced Provides script management, debugging tools,
Code Execution
tools for managing projects. and interactive execution.
Displays plots, help documentation, and
Visualization Generates plots in a separate window.
variables in dedicated panes.
Additional Supports R Markdown, Shiny apps, version
Only includes core R functionality.
Features control (Git), and package management.
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Continued Submission Date:
09 10-02-2025
CSV File:
The csv file is a text file in which the values in the columns are separated by a comma. It is
commonly used for data exchange between software applications like spreadsheets (Excel),
databases, and programming languages (R, Python, etc.).
Reading a CSV File:
data <- read.csv("input.csv")
print(data)
Operators:
Operators are essential in programming and mathematics for performing various operations such
as arithmetic calculations, comparisons, logical decisions, and data manipulation.
Quartiles: A quartile is a type of statistical measure that divides a set of data into four equal
parts. Each quartile contains 25% of the data points.
There are three quartiles that help us understand the spread and distribution of the data:
1. First Quartile (Q1): The first quartile (Q1) is the median of the lower half of the dataset.
It marks the point below which 25% of the data points fall. It is also known as the 25th
percentile.
2. Second Quartile (Q2): The second quartile (Q2) is the median of the entire dataset. It
divides the dataset into two equal halves. It is also known as the 50th percentile.
3. Third Quartile (Q3): The third quartile (Q3) is the median of the upper half of the dataset.
It marks the point below which 75% of the data points fall. It is also known as the 75th
percentile.
Variance: Variance is a statistical measure that tells us how much the values in a dataset differ
from the mean (average). It is the average of the squared differences from the mean. In simpler
terms, variance gives us an idea of the spread or dispersion of the data.
Assignment No. Name of the Assignment Assigned Date:
01 14-01-2025
Page No. Basic Concepts on Fundamentals of Submission Date:
10 Computer and R Programming 10-02-2025
Graphical Representation:
Line Graph:
A line graph is a type of chart that displays data points in a continuous manner by connecting
them with straight lines. It is typically used to represent trends over a period of time or
continuous data, making it easy to visualize changes and relationships between variables.
Bar Chart:
A bar chart is a visual representation of data where rectangular bars are used to represent
different categories or values. The length or height of each bar is proportional to the value or
frequency it represents.
ANOVA in R:
ANOVA (Analysis of variance) is a statistical technique used to compare the means of two or
more group to determine if there is a statistically significant difference among them. Analysis
of variance used to investigate relations between categorical variables and continuous variables
in the R programming.
Key characteristics of ANOVA:
➢ ANOVA compares the means of multiple groups.
➢ It uses the F-statistic to test if there are significant differences between groups.
➢ Assumptions include normality, independence, and equal variances.
➢ If differences are found, post-hoc tests identify where those differences lie.
Types of ANOVA:
1. One-Way ANOVA: Compares the means of three or more groups based on one factor
(independent variable).
2. Two-Way ANOVA: Compares the means of groups based on two factors, and also
examines if there is an interaction between these two factors.
ggplot:
ggplot is a data visualization package in R that provides a powerful and flexible system for
creating a wide range of graphs and plots. It is part of the ggplot2 package, which follows the
Grammar of Graphics, a framework for creating visualizations in a systematic and consistent
way.
AgroR Library:
The AgroR library in R is a specialized package designed for agronomic data analysis and
statistical analysis in agricultural research. It provides functions that help in analysing
experimental designs, performing statistical tests, and visualizing data related to agriculture and
plant breeding.