In this lesson we talks about pointers and arrays
Month: July 2020
Variables and Data types – Storage and size
In this lesson we discuss about the storage of variables in memory and the size of different data types.
Data is stored in binary format (0 or 1) and the basic unit of storage is Bit
Bits can be either 0 or 1
Data is stored in multiple bits
for example 4 bits can store maximum 1111 which is equivalent of 2^4 = 15
For data types which also store negative numbers the left most bit is used to store the sign and the remaining bits to store data.
So in case of 4 bits 3 bits will be used to data.
So the maximum value that can be stored is
0111 = 2^3 = 7
For representing negative numbers there are multiple methods the simple of which is one’s complement.
In ones complete a negative number will be represented by flipping all the bits of the equivalent positive number.
For example 7 is represented below
0111 = 7
To represent -7 we flip all 0 to 1 and 1 to 0
1000 = -7
Here the left most bit has value 1 which indicates this is a negative number.
Characters are represented in same format by converting to their ASCII values.
Variables and Data Types
In this lesson we introduce data types and variables.
Getting started with coding
In this lecture we get started with coding and talk about variables and data types.
Setting up your environment
In this lesson we discuss about installing code blocks and additional configuration needed to be able to successfully build and run a C++ program.
Installation Links
Introduction to computer programming
In this video i talk about a basic introduction to computer programming and a few concepts.