943,969 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 3921
  • Assembly RSS
Apr 10th, 2005
0

Just bought an assembly book and having problems with basic stuff.

Expand Post »
Good evening friends,
First off I would like to take this opportunity to thank everyone who contributed to my first post "How long does it take to learn assembly and how difficult is it?"
I would like to thank cscgal, Narue, Kc0arf in particular for their help. Although most people thought it wasn't a good move to learn assembly first, in the end I decided that I'd rather get the tough tuff out of teh way first and do the slightly easier stuff later.

I just bought a new book on the "art of assembly" and learning it without anyones help. So far things have been OK but I have ran into a couple of things i don't understand. Here is a text that I found difficult understanding:

The Hexadecimal Numbering System
Now I do know the hexidecimal system is 0-9 and letters A-F, F=15. So how on earth does 10h=16, and how do the numbers move up after 10h.

Truth gates
Here is a piece of text from the book.

"For example, if you have an eight-bit binary value 'X' and you want to guarantee that bits four through seven contain zeros, you could logically AND the value 'X' with the binary value 0000 1111. This bitwise logical AND operation would force the H.O. four bits to zero and pass the L.O. four bits of 'X' through unchanged. So does this mean that if the H.O.(high order value) was 1010 and you use the AND instruction the comuputer will turn 1010 into 0000, also does the AND instruction always turn 1's into zeros?

Signed and Unsigned Numbers
This is the one that really through me especially when the book says:
"8000h is negative because the H.O. bit is one or 100h is positive because the H.O. bit is zero.

I will be eternally greatful if someone could help me understand these basic concepts so I can continue.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kalel21 is offline Offline
16 posts
since Mar 2005
Apr 11th, 2005
1

Re: Just bought an assembly book and having problems with basic stuff.

before start 10^3 = 100, ^ means "over"
also i use "x" for multiplication sign
lets start

Quote ...
The Hexadecimal Numbering System Now I do know the hexidecimal system is 0-9 and letters A-F, F=15. So how on earth does 10h=16, and how do the numbers move up after 10h.
well in our decimal system when we write 123 for example, it can be write as 1x10^2 + 2x10^1 + 3x10^0 because its base10,
hexadecimal system is base16, so decimal 16 equals = 10h

10h = 1x16^1 + 0x16^0

here some more:
11h = 17
12h = 18
13h = 19
40h = 64
100h = 256 (1x16^2)

try some more to get comfortable... work with big numbers for example....

2. question:

well, AND is logical oparator, here is the truth table : (X AND Y = Z)
X Y | Z
---------------
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1

as you see if both X and Y need to be 1 in order to get 1 as result,
(note: you can think 0 and 1 as false and true respectively)
so
Quote ...
"For example, if you have an eight-bit binary value 'X' and you want to guarantee that bits four through seven contain zeros, you could logically AND the value 'X' with the binary value 0000 1111. This bitwise logical AND operation would force the H.O. four bits to zero and pass the L.O. four bits of 'X' through unchanged
let x be 1011 0110 and
let's AND it with 0000 1111

1011 0110
0000 1111
--------------
0000 0110

you see that when we AND anything with 0 we get 0, and when we AND anything with 1, it remains same.... the book says the samething.

3. one
Quote ...
"8000h is negative because the H.O. bit is one or 100h is positive because the H.O. bit is zero.
its a bit tricky number, lets give an example like first one,
lets change 8000h to binary form first
8000h = 1000 0000 0000 0000 b (confused?)

converting hex to binary is similar to hex to decimal :
8h = 1x2^3 + 0x2^2 + 0x2^1 + 0x2^0

each hex digit can be written with four binary digit.
lets move
when we are dealing with signed numbers we take that most-significant bit(last bit) as negative. so our number turns to
8000h = (-1)000 0000 0000 0000b = (-1)x2^15

well, thats all, if you have more question than before, i suggest you take some algebra book and study,

hope it helps,
Reputation Points: 25
Solved Threads: 11
Junior Poster
tonakai is offline Offline
121 posts
since Feb 2005
Apr 12th, 2005
0

Re: Just bought an assembly book and having problems with basic stuff.

thank you very much. I'm beginning to get the hang of this
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kalel21 is offline Offline
16 posts
since Mar 2005
Apr 14th, 2005
0

Re: Just bought an assembly book and having problems with basic stuff.

I'm now stuck on boolean algebra. can anyone help me? . what are the key boolean algebra concepts I need to know?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kalel21 is offline Offline
16 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: how long does it take to learn assembler and how difficult is it?
Next Thread in Assembly Forum Timeline: I need help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC