Have two registers (pointers): One for taking the data from the array (number under test). Another one for saving the status(+ve or -ve). Have a counter to check if all the elements in the array have been parsed. Follow the process as mentioned in the Video until all the elements in the array have been tested.
Thank you for the review dear Sharatkumar. Hope this explanation will clear your confusion. 8051 is a 8 bit microcontroller. Hence the accumulator can take on 2^8 combinations of input that is 256 combinations. Depending on the MSB the following the number is said to be: Positive if the MSB is 0, that is 00H-7fH Negative if the MSB is 1, that is 80H-ffH Hence 80H is not a positive number according to the convention used.
How should we write the similar program if we're supposed to find positive and negative in an array???
Have two registers (pointers):
One for taking the data from the array (number under test). Another one for saving the status(+ve or -ve).
Have a counter to check if all the elements in the array have been parsed.
Follow the process as mentioned in the Video until all the elements in the array have been tested.
Sir if postive value like 80 the 1st binary digit value will be 1 so this programm fail in this case
Thank you for the review dear Sharatkumar.
Hope this explanation will clear your confusion.
8051 is a 8 bit microcontroller. Hence the accumulator can take on 2^8 combinations of input that is 256 combinations.
Depending on the MSB the following the number is said to be:
Positive if the MSB is 0, that is 00H-7fH
Negative if the MSB is 1, that is 80H-ffH
Hence 80H is not a positive number according to the convention used.
Sir can I get this ppt please
Access it from this link drive.google.com/file/d/1qsmgh0wsw9r1tzjZ2DrVpDJrYgW19ntO/view?usp=sharing
@@harshabk3863 thankyou sir