RUVIDEO
Поделитесь видео 🙏

Variables and Memory || Lesson 5 || C Programming || Learning Monkey ||

In this class, we will try to understand Variables and Memory. The objective of this class is to know how the values assigned to the variables will be stored in the memory.

Practically values are not stored as shown above because the computer does not know how to hold the decimal numbers.

How a computer stores the values of the variables?

The values of the variables are stored in binary format.

The computer understands only two symbols, 1 and 0.
Understanding the conversion of decimal to binary and binary to decimal is beyond the scope of this course.

It is not required to understand those representations and conversions.

From the above image, how many decimal numbers are represented by using only 1 bit.

Using 1 bit, you can represent decimal numbers 0 and 1.

Similarly, how many decimal numbers are represented by using 2 bits.

Using 2 bit, you can represent four decimal numbers 0, 1, 2, and 3.

Similarly, how many decimal numbers are represented by using 3 bits.

The binary representation of decimal number 1 is 1. Adding zero’s to the right [00001] does not change its value.

Using 3 bit, you can represent eight decimal numbers 0, 1, 2, 3, 4, 5, 6, and 7.

With n bits, we can represent 2n decimal numbers.

For example, with n = 4, you can represent 16 decimal numbers.

The range of numbers that you can represent with n = 4 is 0 to 2n – 1.


Each dash can store a bit of data.

A group of eight bits is called a byte.

Each block is of 1-byte capacity.
Variables and Memory

For example, consider the line of code given below.

int a = 14;

Variable a is allocated with the memory location 3.

Now with the new way of memory visualization, how 14 can be stored.

The binary equivalent of the decimal number 14 is 1110.

As each block of memory has 8 bits, pad an extra four zero’s to the right of the binary number [00001110].






Link for playlists:
https://www.youtube.com/channel/UCl8x4Pn9Mnh_C1fue-Yndig/playlists


Link for our website: https://learningmonkey.in

Follow us on Facebook @ https://www.facebook.com/learningmonkey

Follow us on Instagram @ https://www.instagram.com/learningmonkey1/

Follow us on Twitter @ https://twitter.com/_learningmonkey

Mail us @ [email protected]

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Variables and Memory || Lesson 5 || C Programming || Learning Monkey ||», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.