![]() |
| ||
| Just bought an assembly book and having problems with basic stuff. 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?" :D 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 :confused: 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. |
| |||
| 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:
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:
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:
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, :cool: hope it helps, |
| ||
| 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 :D |
| ||
| Re: Just bought an assembly book and having problems with basic stuff. I'm now stuck on boolean algebra. can anyone help me? :D . what are the key boolean algebra concepts I need to know? :D |
| All times are GMT -4. The time now is 6:19 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC