SlideShare a Scribd company logo
Answers to End of Chapter Reviews and Exercises
for Assembly Language for x86 Processors, 7th
Edition
by Kip R. Irvine
Chapters 1 and chapter 2 sample
Revision date: 1/18/2014
Chapter 1
1.7.1 Short Answer Questions
1. Most significant bit (the highest numbered bit).
2. (a) 53 (b) 150 (c) 204
3. (a) 110001010 (b) 110010110 (c) 100100001
4. 00000110
5. (a) 8 (b) 32 (c) 64 (d) 128
6. (a) 12 (b) 16 (c) 16
7. (a) 35DA (b) CEA3 (c) FEDB
8. (a) 0000 0001 0010 0110 1111 1001 1101 0100
(b) 0110 1010 1100 1101 1111 1010 1001 0101
(c) 1111 0110 1001 1011 1101 1100 0010 1010
9. (a) 58 (b) 447 (c) 16534
10. (a) 98 (b) 1203 (c) 671
11. (a) FFE8 (b) FEB5
12. (a) FFEB (b) FFD3
13. (a) 27641 (b) 16093
14. (a) 19666 (b) 32208
15. (a) −75 (b) +42 (c) −16
16. (a) −128 (b) −52 (c) −73
17.(a) 11111011 (b) 11010110 (c) 11110000
18. (a) 10111000 (b) 10011110 (c) 11100110
19. (a) AB2 (b) 1106
20. (a) B82 (b) 1316
21. 42h and 66d
22. 47h and 71d
23. 229
 1, or 6.8056473384187692692674921486353 X 1038
Assembly Language For X86 Processors 7th Edition Irvine Solutions Manual
Full Download: http://alibabadownload.com/product/assembly-language-for-x86-processors-7th-edition-irvine-solutions-manual/
This sample only, Download all chapters at: alibabadownload.com
24. 286
 1, or 77371252455336267181195263
25. Truth table:
26. Truth table: (last column is the same as #25)
27. It requires 24
(16) rows.
28. 2 bits, producing the following values: 00, 01, 10, 11
1.7.2Algorithm Workbench
1. Code example (C++)
int toInt32(string s) {
int num = 0;
for(int i = 0; s[i] >= '0' && s[i] <= '1'; i++) {
num = num * 2 + s[i]-'0';
}
return num;
}
2. Code example (C++)
int hexStrToInt32(string s) {
int num = 0;
for(int i = 0; ; i++) {
if( s[i] >= '0' && s[i] <= '9' )
num = num * 16 + s[i]-'0';
else if( s[i] >= 'A' && s[i] <= 'F' )
num = num * 16 + (s[i]-'A'+10);
else
break;
}
return num;
}
3. Code example (C++)
string intToBinStr( int n ) {
vector<int> stack;
do {
int quotient = n / 2;
int remainder = n % 2;
stack.push_back(remainder);
n = quotient;
} while( n > 0 );
string s;
while( stack.size() > 0 ) {
s += (stack.back() + '0');
stack.pop_back();
}
return s;
}
4. Code example (C++)
string intToHexStr( int n ) {
vector<int> stack;
do {
int quotient = n / 16;
int remainder = n % 16;
stack.push_back(remainder);
n = quotient;
} while( n > 0 );
string s;
while( stack.size() > 0 ) {
int d = stack.back();
if( d >= 0 && d <= 9 )
s += (stack.back() + '0');
else // probably a hex digit
s += (stack.back() - 10 + 'A');
stack.pop_back();
}
return s;
}
5. Code example (C++)
string addDigitStrings( string s1, string s2, int base ) {
string sumStr;
int carry = 0;
for(int i = s1.size() - 1; i >= 0; i--) {
int dval = (s1[i] - '0') + (s2[i] - '0') + carry;
carry = 0;
if( dval > (base - 1) ) {
carry = 1;
dval = dval % base;
}
sumStr.insert(sumStr.begin(), (dval + '0'));
}
if( carry == 1 )
sumStr.insert( sumStr.begin(), 1 + '0');
return sumStr;
}
Chapter 2
2.8.1Short Answer Questions
1. EBP
2. Choose 4 from: Carry, Zero, Sign, Direction, Aux Carry, Overflow, Parity.
3. Carry flag
4. Overflow flag
5. True
6. Sign flag
7. Floating-point unit
8. 80 bits
9. True
10. False
11. True
12. False
13. True
14. False
14. False
15. False
16. True
17. False
18. True
19. False
20. False
21. True
22. True
23. False
24. False
25. Hardware, BIOS, and OS
26. It gives them more precise control of hardware, and execution is faster.
Assembly Language For X86 Processors 7th Edition Irvine Solutions Manual
Full Download: http://alibabadownload.com/product/assembly-language-for-x86-processors-7th-edition-irvine-solutions-manual/
This sample only, Download all chapters at: alibabadownload.com

More Related Content

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
Nguyen Thanh Tu Collection
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
shreyassri1208
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
BPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end examBPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end exam
sonukumargpnirsadhan
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
BPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end examBPSC-105 important questions for june term end exam
BPSC-105 important questions for june term end exam
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 

Featured

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Assembly Language For X86 Processors 7th Edition Irvine Solutions Manual

  • 1. Answers to End of Chapter Reviews and Exercises for Assembly Language for x86 Processors, 7th Edition by Kip R. Irvine Chapters 1 and chapter 2 sample Revision date: 1/18/2014 Chapter 1 1.7.1 Short Answer Questions 1. Most significant bit (the highest numbered bit). 2. (a) 53 (b) 150 (c) 204 3. (a) 110001010 (b) 110010110 (c) 100100001 4. 00000110 5. (a) 8 (b) 32 (c) 64 (d) 128 6. (a) 12 (b) 16 (c) 16 7. (a) 35DA (b) CEA3 (c) FEDB 8. (a) 0000 0001 0010 0110 1111 1001 1101 0100 (b) 0110 1010 1100 1101 1111 1010 1001 0101 (c) 1111 0110 1001 1011 1101 1100 0010 1010 9. (a) 58 (b) 447 (c) 16534 10. (a) 98 (b) 1203 (c) 671 11. (a) FFE8 (b) FEB5 12. (a) FFEB (b) FFD3 13. (a) 27641 (b) 16093 14. (a) 19666 (b) 32208 15. (a) −75 (b) +42 (c) −16 16. (a) −128 (b) −52 (c) −73 17.(a) 11111011 (b) 11010110 (c) 11110000 18. (a) 10111000 (b) 10011110 (c) 11100110 19. (a) AB2 (b) 1106 20. (a) B82 (b) 1316 21. 42h and 66d 22. 47h and 71d 23. 229  1, or 6.8056473384187692692674921486353 X 1038 Assembly Language For X86 Processors 7th Edition Irvine Solutions Manual Full Download: http://alibabadownload.com/product/assembly-language-for-x86-processors-7th-edition-irvine-solutions-manual/ This sample only, Download all chapters at: alibabadownload.com
  • 2. 24. 286  1, or 77371252455336267181195263
  • 3. 25. Truth table: 26. Truth table: (last column is the same as #25) 27. It requires 24 (16) rows. 28. 2 bits, producing the following values: 00, 01, 10, 11 1.7.2Algorithm Workbench 1. Code example (C++) int toInt32(string s) { int num = 0; for(int i = 0; s[i] >= '0' && s[i] <= '1'; i++) { num = num * 2 + s[i]-'0'; } return num; } 2. Code example (C++) int hexStrToInt32(string s) { int num = 0; for(int i = 0; ; i++) { if( s[i] >= '0' && s[i] <= '9' ) num = num * 16 + s[i]-'0'; else if( s[i] >= 'A' && s[i] <= 'F' ) num = num * 16 + (s[i]-'A'+10); else break; } return num; } 3. Code example (C++) string intToBinStr( int n ) { vector<int> stack; do { int quotient = n / 2;
  • 4. int remainder = n % 2; stack.push_back(remainder); n = quotient; } while( n > 0 ); string s; while( stack.size() > 0 ) { s += (stack.back() + '0'); stack.pop_back(); } return s; } 4. Code example (C++) string intToHexStr( int n ) { vector<int> stack; do { int quotient = n / 16; int remainder = n % 16; stack.push_back(remainder); n = quotient; } while( n > 0 ); string s; while( stack.size() > 0 ) { int d = stack.back(); if( d >= 0 && d <= 9 ) s += (stack.back() + '0'); else // probably a hex digit s += (stack.back() - 10 + 'A'); stack.pop_back(); } return s; } 5. Code example (C++) string addDigitStrings( string s1, string s2, int base ) { string sumStr; int carry = 0; for(int i = s1.size() - 1; i >= 0; i--) { int dval = (s1[i] - '0') + (s2[i] - '0') + carry; carry = 0; if( dval > (base - 1) ) { carry = 1; dval = dval % base; } sumStr.insert(sumStr.begin(), (dval + '0')); } if( carry == 1 ) sumStr.insert( sumStr.begin(), 1 + '0'); return sumStr; } Chapter 2 2.8.1Short Answer Questions 1. EBP
  • 5. 2. Choose 4 from: Carry, Zero, Sign, Direction, Aux Carry, Overflow, Parity. 3. Carry flag 4. Overflow flag 5. True 6. Sign flag 7. Floating-point unit 8. 80 bits 9. True 10. False 11. True 12. False 13. True 14. False 14. False 15. False 16. True 17. False 18. True 19. False 20. False 21. True 22. True 23. False 24. False 25. Hardware, BIOS, and OS 26. It gives them more precise control of hardware, and execution is faster. Assembly Language For X86 Processors 7th Edition Irvine Solutions Manual Full Download: http://alibabadownload.com/product/assembly-language-for-x86-processors-7th-edition-irvine-solutions-manual/ This sample only, Download all chapters at: alibabadownload.com