Introduction to Assembly
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:02
Hello. This is Dr Miller and this is Episode 1.2 of Assembly
00:08
today. What we're gonna learn about is assembly architectures and data representation, including binary, hexi decimal and two's Complement.
00:18
So what is? Assembly
00:20
Assembly is the second lowest level program, like language that we have four computers.
00:26
It is written for a specific architecture, including X 86 arm spark or even the cell processor.
00:33
And the basic assembly commands will create binary code by an assembler. And so it'll create the execute herbal that will get run on one of these computers. The raw binary code.
00:47
There are several different assemblers that we could use. There is the Microsoft assembler Orme as, um,
00:52
turbo assembler
00:54
Nazem organ new assembler. In this course, we will learn about the Nazem assembler, and will you also use the canoe assembler for arm assembly?
01:06
Soas faras. The architectures go we have at the lowest level. We have the digital binary logic
01:12
that each of the processor makers create, and they do this by
01:18
creating or gates and and gates and using transistors. On top of that, the creators of the instruction set will create an instruction set, architecture or I s a
01:30
And this is a specifications that any one of those processors would use in order to, for example, move data from main memory into a register or do in addition.
01:42
And so, from the instruction set architecture, we create assembly language.
01:47
And so assembly language is going to give us the,
01:51
um, commands that are somewhat generic. So you can say add one registered to another
01:57
in a language that is understandable by humans, as opposed to understandable by computers.
02:02
The instruction set architecture is defined by these processor makers, and so it tends to be
02:09
op codes, which are binary in nature
02:14
and then high level programming languages like C Java PERL. They're built on top of assembly language, and so these languages will end up generating assembly languages or building interpreters that will run in assembly language
02:32
data representation.
02:35
So computers store data as we should know using ones or zeros.
02:39
But reading ones and zeros is a difficult process. And so people who do a lot of programming a lot of low level programming will use different representations in order to store the data, because it's easier for us to read. So some of these representations are hex, a decimal asking and two's complement.
03:00
So binary data we have each one of these
03:02
represents a bit. So I have a zero bit in a one bit, and we have them in a particular order, meaning that this bit represents either the number one or having it or not having it, or the number two having it or not having it.
03:20
And so
03:22
each one of these bits represents whether or not that thing is on or off.
03:27
And so we can see here that I have eight bits and a bets is known as a bite.
03:31
If I have four bits, that's also called a nibble or half of a bite,
03:36
and you can use powers of two as you can see 12 for eight each time it doubles. And that is probably the easiest way for most students to learn how to convert something from binary into decimal.
03:50
So, for example, if we have the two bit on the 32 bit on in the 64 bit on, if we add all those together, this binary number represents the decimal number 98
04:03
and you can play with it by changing some of these bits and then seeing what the ending result is for this number.
04:12
Now, Hexi Decimal is a way to take each nibble right and represent it by using one digit.
04:19
The digits go from 0 to 9 and then a through F.
04:26
And so if you have the letter D, what that represents in binary is 1101 It also represents the number 13 in decimal.
04:36
And so this is a way where you could write one bite by using just to hex digits.
04:43
And reading to hex digits is, for example, a F is a lot easier than reading. 10101111
04:53
And so, ah, lot of times very low level programmers will use Hexi Decimal so that they can
04:59
understand what is happening but not get lost in all of the ones and zeros that air going across the screen.
05:05
It's a lot of things like assemblers and dis. Assemblers will use Hexi Decimal in order to represent
05:12
the data
05:15
two's complement. So this is a way that computers will use to store data that is either positive or negative, so we can have either a positive number and negative number
05:27
in twos complement the most significant bit. So if I have eight bits the top bit, if it's a zero, then we have a positive number.
05:35
And then if it's a one, we have a negative number
05:38
and in a later lecture will learn how to convert a number in two's complement.
05:44
If the uppermost bit is a one, then we flip all of bits. So all the zeros become ones and all the ones become zeros.
05:50
And then we would add one to the result that we have.
05:57
We also have characters so characters can be asking or the American standard for coded information interchange.
06:04
And this was an American standard created a long time ago that used just eight bits or characters, and it just represented the American characters of letters you know, a three Z and,
06:16
um, punctuation. Anything that you would generally see on an American keyboard
06:21
and then for the letters or things that you would be able to see. The most significant bit is going to be a zero,
06:28
But assembly can very easily convert from characters two bites, because in the end we have to have bites in order to
06:35
um, save our data inside of our files.
06:40
But since ask e was introduced, we've also added the Unicode standards. So this is one standard for all of the world.
06:46
And so some of these are utf 8 16 and 32. And this basically he means how Maney bits were going to use for that.
06:54
And so utf 32 has the ability to store every single character that we could want an emoji as well. And so this standard allows anybody, even some of the pictographic languages, to have characters representing all the different words that they have inside of their languages.
07:14
So in summary, we briefly discussed discussed the assembly architecture. We discuss the different binary data representations, including binary, Hexi, Decimal, two's complement
07:27
and even the different types of methods for storing characters
07:33
looking forward will look at different architectures, registers and then protected moon.
07:40
If you have any questions, you can contact me at Miller, M J u n k dot edu, or on Twitter at Milhouse 30
Up Next
Similar Content