Got it

Overflow flag

Created: Nov 9, 2020 05:55:06Latest reply: Nov 9, 2020 13:40:31 702 4 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

In 8086 the overflow flag is set when

a) The sum is more than 16 bits

b) Signed numbers go out of their range after an arithmetic operation

c) Carry and sign flags are set

Featured Answers

Recommended answer

smileymind
Created Nov 9, 2020 05:56:16

Hello, friend!


I think b) Signed numbers go out of their range after an arithmetic operation.


Overflow Flag (O) – This flag will be set (1) if the result of a signed operation is too large to fit in the number of bits available to represent it, otherwise reset (0).


B.R.

View more
  • x
  • convention:

All Answers

Hello, friend!


I think b) Signed numbers go out of their range after an arithmetic operation.


Overflow Flag (O) – This flag will be set (1) if the result of a signed operation is too large to fit in the number of bits available to represent it, otherwise reset (0).


B.R.

View more
  • x
  • convention:

E.DR_91
E.DR_91 MVE Author Created Nov 9, 2020 06:50:24

signed numbers go out of their range after an arithmetic operation
View more
  • x
  • convention:

@Sokrin, please note that this is the Huawei Enterprise Product technical support community. Please do not frequently publish content that is not related to Huawei's enterprise products
View more
  • x
  • convention:

Hi Friend,

The answer is signed numbers go out of their range after an arithmetic operation, The  overflow flag is set during arithmetic operations when the resulting number of bits will not fit (including the twos complement bit) in the register of the arithmetic logic unit (ALU).Computers  have a limited number of bits to perform math directly in the CPU. This  can be overcome to some degree by software that detects these overflows  and moves information to other memory locations, allowing for some HUGE numbers, but in general, most math in a computer is limited to the ranges specified by the various types, and that maximum range for that type. So that if you add two large integer values and the result exceeds  the number of bits that the ALU can handle the overflow flag is set.
Overflow Flag (O) – This flag will be set (1) if the result of a signed operation is too large to fit in the number of bits available to represent it, otherwise reset (0). After any operation, if D[6] generates any carry and passes to D[7] OR if D[6] does not generates carry but D[7] generates, overflow flag becomes set, i.e., 1. If D[6] and D[7] both generate carry or both do not generate any carry, then overflow flag becomes reset, i.e., 0.

Example: On adding bytes 100 + 50 (result is not in range -128…127), so overflow flag will set.


View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.