From the course: Rust Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Integer data types - Rust Tutorial
From the course: Rust Essential Training
Integer data types
- [Instructor] Computers don't think the same way you and I do as humans. Down at their lowest level, computer store data using units of information called bits where a single bit can only have one of two possible values, one or zero. And they use sequences of these binary bits to represent the information we care about. So, how do we bridge the gap between the way we understand information as humans and the way a computer deals with information as ones and zeros. For example, if a computer uses this sequence of bits to represent something, what does it mean? If interpreted to be a number this particular sequence of bits could represent 82. But that same sequence of bits could also be interpreted in a different way as a character to represent the letter 'R'. This is why we associate each piece of data in our program with a specific Data Type, which tells the computer, what we as the programmer intent that data to mean.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Declaring variables5m 46s
-
(Locked)
Integer data types6m 51s
-
(Locked)
Floating-point data types5m 34s
-
(Locked)
Arithmetic operations6m 37s
-
(Locked)
Formatting print statements5m 40s
-
Bitwise operations10m 46s
-
(Locked)
Boolean data type and operations5m 4s
-
(Locked)
Comparison operations3m 5s
-
Char data types2m 36s
-
(Locked)
Challenge: Find the average1m 20s
-
(Locked)
Solution: Find the average3m 20s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-