Solved

help on assembly language

Posted on 1998-10-31
1
162 Views
Last Modified: 2010-04-27

   Hi there,

        I need ur answer for these questions.

         Why does -32,768 an issue? and
           why does it work anyway?
0
Comment
Question by:nirvani
1 Comment
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1011984
I don't really understand what your question is.

-32,768 is 8000H. This is the largest negative number. CPUs generally represent signed integers in "two's complement" notation. The MSB represents the sign and the remaining bits represent the value.

Two's complement is acheived by negating the value and adding 1. This helps in doing binary math.

0000H = 0
0001H = 1
.
7FFFH = 32,767
8000H = -32,768
8001H = -32,767
.
FFFFH = -1

If you want the absolute value of the negative number simply complement and add 1. Thus
FFFFH = -1

Complement of FFFFH = 0000H
0000H + 1 = 0001H

To make a positive number negative we repeat the process:

Complement of 0001H = FFFEH
FFFEH + 1 = FFFFH

Makes life simple at the electrical level inside the CPU.

This is much less obvious when you're dealing with the decimal equivalents, makes perfect sense at the hex/binary level.

M

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SRX240 SYSLOG Setting 6 109
Advice on suitable tablet device. 13 107
Installing Windows Server2016 on RAID 1 array on Fujitsu Primergy TX1310 M1 Server 3 143
USB ports 4 25
In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now