Why is the difference in +ve & -ve Vlaues? Very BASIC question!

Can anyone tell me why there is a differene in -ve and +ve values of integers/floats etc?
I mean to say that as in C++, an character's max ve value is 127. While its -ve value is -128.
I need 2's complement procedure remembering that in 8-bit pattern in RAM, most significant bit is sign bit.
Please, answer with exapmles. (Same is true for java)

hasan_asd,
Lets take 8 bits for example. With 8 bits there are 256 different combinations, correct. 2 ^ 8 = 256. To a computer, this is just a collection of 8 ones or zeros. We as humans want it to represent a number. We can up with two different ways to approach it. The first way is to have the 8 bits represent an unsigned number. That is, all the numbers are positive. so that possible values that could exist for 256 combinations would be 0 to 255. The second way is for us to say, oh but our we want a negative number as well. So, we made up the rule that the far left bit would represent a negative sign. We then called this a signed number. For a signed number to be positive, the far left bit will be 0. So, the highest positive number we can have is 01111111 and that equals 127. Now, if we change the far left bit to a 1. The remaining seven bits are the value in the negative direction. So, 11111111 = -127 for a signed number. That leaves one combination left for signed numbers and that is 10000000. What number is this suppose to be. Keep in mind that the far left bit represents negativity for signed numbers, so It can't be +128. Also, keep in mind that we have only used up 255 possible combinations of our 256, so, since it is a negative number, it must be -128. I hope this helped. Just remember that the eight-bit pattern you have depends on what the programming language considers it to be. With C++ you can physically declare it as signed or unsigned, but in Java it is unsigned.
tajenkins

Similar Messages

  • If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question

    If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question. Trying to hold out as long as I can, but purchasing an iPhone for Christmas and new iMac next year when warrently expires.

    Thank U very much for the quick reply, I wanted to upgrade this weekend, but still on the fence. I can live with the software that is not compatible, they are on another compuetr, just didn't want the obvious stuff to stop working.

  • Possibly a very basic question but I have set up a spread sheet in Numbers and have viewed help videos but I can't get it to give me sums for the columns I highlight.  Keeps coming up with the figure zero.  I have version 09 2.3(554). Can anyone help

    Possibly a very basic question but I am going nowhere without a solution.  I have set up a spreadsheet in Numbers but it won't give me sums for chosen columns. I  have viewed the run through videos and used the formula but nothing happens apart from giving a figure of zero or a red arrow.  The sum icon in the bottom left hand section of the window does not highlight or show any total as I understand from the video that you can drag whatever total is here onto the relevent position on your spreadsheet.  I have Numbers 09 version 2.3 (554). Can anyone advise. Thanks.

    Hi Sohojools,
    To sum a column, use a formula such as this one in Cell A6
    Type this in a cell below your data:
    =SUM(A2:A4) or whatever range of cells you want to sum. The easy way is to type:
    =SUM(
    and then drag or shift-click to select the range of cells. Close the formula with a final bracket ")".
    The sum icon in the bottom left hand section of the window does not highlight or show any total
    To see the sum (and other simple statistics) in the bottom left, select a range of cells. That tells Numbers which cells you are refering to.
    The videos are good, but the Numbers'09 User guide, and the Formulas and Functions User Guide are better. Download them from the Help Menu in Numbers.
    Regards,
    Ian.

  • Very basic question... can photoshop overwrite the original file?

    Very basic question... can Photoshop Elements 13 overwrite the original file?

    You will need to check the Photoshop Elements for any particulars about that software.
    For Photoshop, if I make changes and exit saving those changes, yes the original is overwritten.
    Keep backups at all times and don't work off flash external drives. When people tell me their original 500 layer file got corrupted, and they didn't keep copies, I hate to tell them their weeks of work is down the bucket.
    In Photoshop, we use Image > Duplicate to work on a copy if we don't want the original touched, or File > Save as... where we give the file a different name. We save image.psd as image1.psd and image.psd is closed. We then have a copy, "Image1" opened.
    Gene

  • Why is the difference between CS2 and LR

    Anyone had the same issue? I have been printing from CS2 for ages now and everything has been working perfectly. The right selection of paper/printer icc profile (R2400) and printer color management turned off. Never had any problem. Now doing the same from Lightoom, I am getting a terrible result- all the prints have a yellow hue and underexposed. Any suggetions? thanks Miklos

    "Do you think that simply using USB instead of Firewire would make the difference? "
    If it hurts when you do something, don't do that...
    :~)
    As I said, there have been resports of "issues" using Epson FireWire...I have a friend with a 7800 that has the same problem on MacIntel using FireWire...once he connected via USB he was able to get to the normal Epson driver settings in Lightroom...
    What you seem to be getting in the Lightroom accessed driver is the CUPS driver, not the full Epson driver-hense the lack of no color management...and that's what you need to get equal output between Photoshop & Lightroom.
    Try USB and delete all the current Epson printers you have and re-add them via USB and see if that fixes it. I think this is an Epson/FireWire on MacIntel issue.

  • The create facility in iPhoto is very basic - how can I download something like MS Publisher for my Mac Air?

    The create facility in iPhoto is pretty basic for cards & books etc. - how can I download something like MS Publisher for my Mac Air?

    Pages works pretty well, which should be on the App store:
    http://www.apple.com/iwork/pages/

  • Why is the difference in execution speed of the function "SetCtrlVa​l" between constant and changing values so small ?

    In my large application (1 MB exe-file) I am continuously updating a lot of numeric controls with new values. Most of them do not really change their value. Within my search of improving the performance of my application I noticed, that there is only a small difference of the execution speed between a call of "SetCtrlValue" with constant values and calls with changing values. It runs much faster (25 times on my PC), if I get the actual control value with "GetCtrlVal", compare it with my new value an do a call to "SetCtrlVal" only if the current value and the new value are different.
    My questions to CVI-developers is:
    Isn't it possib
    le to do this compare within the function "SetCtrlVal"
    My question to all CVI-users is:
    Does anyone have similar tips to improve the performance of CVI applications ?
    I developed a small test application for this problem, which I can mail to interested users.

    What takes the extra time is the redraw of the control. When you call SetCtrlVal we ALWAYS redraw the control. We wouldn't want to build in functionality to check if the value was the same because that would add additional time to the SetCtrlVal in every case. If you want to do it outside of the loop you can as you have done above. You have a few options. First, keep a previous value variable for the controls that you can use to determine whether to set the control value. I.E.
    int oldVal = 0;
    int newVal = 0;
    if(newVal!=oldVal) {
    SetCtrlVal(..., newVal);
    oldVal = newVal;
    Also, if you set the value of a control through SetCtrlAttribute instead, there is no built in redraw of the control (which is what takes all the time). Using SetCtrlAttribute
    to set the value is very fast, but remember there isn't a built in redraw on the screen to display the new number.
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • Why is the difference in the Driver Version numb

    Hi all,I from down load site did a down load of the SB X-Fi Xtreme Music driver version 2.5.002. After my download the Dell's Device Manager Details for the SB X-Fi Xtreme Driver detailssuggestsVersion 6.0..35Date 0/5/2007. Mine a factory installed upgraded SB X-Fi Xtreme music PCI sound card. Would this be an OEM or Not?Thanking you?Snow

    Its the package version I think as ssome drivers can contain lots of different versions.Would make sense to line up all up and call it the 6.0..35 package, but only NVIDIA seems to have the common sense to release drivers in such a way (even ATI like having Catalyst releases containing a different control center version and display driver version)

  • Why is the iPod so . . . . . basic?

    I love both my green iPod mini and my iPod Video (love the video a little - no, a lot - more). I found a really cool alternate jukebox that you can load onto your iPod called Rockbox - and it has some GREAT features. It allows you to alter pretty much anything on the jukebox - including the abliity to set backgrounds and fonts. It also has some fun plugins, including fun games (more fun than the four that come with the iPod) and some neat screensavers. You can set it up to load the Os you want - Apple or Rockbox.
    It does have its own downsides. It is rather hard to use with music - it won't play iTunes purchases (of course) and is pretty confusing (for me) to make playlists. Some of the songs pause while palying a game and listening to music - not a huge deal. It has the ability to play the old Gameboy and Gameboy Color games, but the interface is quite buggy and really doesn't work (BIG disappointment).
    And please, no one yell at me for putting something else on my iPod. I mean, it is fun, but a bit limited. I am sure this violates warranties, but since you can hardly damage it (it is so easy to delete or reformat), this is not a big deal for me.
    So my questions is this: I always associate Apple with entertainment and cutting edge interfaces. So why is everything so basic on the iPod? I'm quite surprised that there isn't a much more visual interface (a rotating circle of icons for the catagories, for instance), more games (why isn't anyone working with some of the game companies and then selling the games for a few dollars on iTunes - like Bejeweled or some pinball games), and more personalizable features (like fonts and their colors, some background images, and user interface).
    And where would one send an email to propose something like this?

    Wow! Hip ideas! That would be cool. I think Apple is working on it already and is still researching which "stuffs" can be added to our ipods. Well, they've done it to our computers, why not to our ipods?
    From how I understand how ipod is evolving from nano to 5th generation, the target market of ipod is practically becoming wider and doesn't only focus on teenagers. Maybe apple, specifically their ipod products, also want to reach the older age bracket. Like the working people for example. Of course, the yuppies are included here. To think about it, people who really can afford these types of gadgets are those who earn. Yep! Students/Children/teenagers are also one. Those who try to earn from their allowance and from their part time or summer job or maybe those who can just ask money from their parents.

  • It's not clear to me why within the Apple eccosystem of products something as basic as editing a MOV file recorded with an iPhone requires any 3PV software for conversion so that it may be edited in iMovie09.  Is this an iMovie Bug?

    Is this a bug within the iMovie?  This seems as if it should be extremely simple.  I recorded a movie with my iPhone 4.  iPhone records that in the standard apple MOV format.  I can play the file in Quicktime.  However, when I try to drag and drop it into iMovie09 or import it into iMovie09 it is not allowed.  It used to be said that Apple just "Works".
    Sean

    I own the movies and I want them to stay in my iTunes library basically forever.
    But in both cases the file name no longer shows in the movie list, so I don't know how to re-download it from the Cloud.
    iTunes prefs > Store > Show iTunes in the Cloud purchases.
    This will show all your iTunes purchases in your library with a cloud icon down arrow. Click the icon to redownload or click on Play to stream without downloading.
    Also see this , -> Download past purchases
    and techncially, you don't "own" the movie, You simply have a license to use it.
    Yet the first thing iTunes does when you hit the delete key is tell you that it will remove the movie forever from all devices and the library.
    Actually, no it does not tell you that.
    FYI: You should keep copies of all yoru iTnue spurahses as the labels/movie studios/copyright owners can pull their product at anytime and it won't be available to redownload.
    Suggestions here -> http://www.apple.com/feedback/

  • Why does the persona that I created get very large when I post it even though its the correct dimensions?

    Every time we try and upload our persona, it shows up on screen very large. It seems like the dimensions are oversized and shows up on screen as only about 1/4 of the full design. Its like an extreme close up view of what what we built. We've built it to the specs provided on the site. If you want to check it out, the persona was created by Worth. Any suggestions on how to fix this?

    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
      Apple - iPod Repair price

  • Can someone explain the difference between these to kerberos AFP listings

    I have been doing quite a bit of digging to solve a widespread AFP idle disconnect issue, and while comparing settings among multiple servers, I noticed a kerberos recond variation that I don't understand.
    Most of the servers under the APF settings list a record like this:
    afp:kerberosPrincipal = "afpserver/[email protected]"
    One in particular, lists a record like this that is comepletely different from the other servers:
    afp:kerberosPrincipal = "afpserver/LKDC:SHA1.F4848D1138AE9704A1A67C3F2F25AE98465D6465@LKDC:SHA1.F4848D1138AE9704A1A67C3F2F25AE98465D6465"
    Can anyone explain to me why the difference and what it means?

    Basically it's the Local Key Distribution Centre ostensibly used for peer to peer file sharing and Access Control Lists etc as compared to SSO in a Networked Directory environment such as OD, AD, eDirectory, OpenLDAP etc. Wikipedia explains it fairly well if you're interested?
    https://dreness.com/wikimedia/index.php?title=LKDC
    In practical terms I have seen it cause confusion sometimes when authenticating file shares. It usually happens when File Sharing has been started prior to configuring DNS Services properly and starting PM and/or OD. The AFP server preference file appears to be 'locked' with the LKDC info instead of the server one and networked users fail to authenticate when accessing a share. It's a rare-ish occurence (I've seen it happen a few of times) but can take a while to troubleshoot because defining shares and applying ACLs in the GUI shows no problems.
    However this may not be the case with whatever problems you may be having? It's easy to 'fix' though, simply unshare whatever you've shared, stop the service, remove the preference file, reboot the server, restart the service. Check the information in the preference file is what it should be.

  • What is the differences between Clone & Healing Brushes?

    Dear Forum,
    I am using PSE 5.0. Could someone explain the difference between the Clone tool and the Healing Brush tool? They both seem to require a source pixel area and a destination pixel area. I understand why the Spot Healing Brush is different, but I am at a loss to see why what the difference is with the Clone tool. Thanks in advance.
    Bob
    Robert Schuldenfrei
    [email protected]

    The clone stamp puts down an exact copy of the sampled material. The healing brush blends it in with the underlying area.

  • Differences betweEn ORDERS02 and ORDERS05 of basic type idocs.

    Hi Experts,
    Pls. let me know that, What is the difference betwen ORDERS02 and ORDERS05 of basic type idocs.
    bcoz, in my system(ECC 6.0), in WE05, I am seeing some are posted with ORDERS02 and where as some are posted with ORDERS05............both Message type is same-ORDERS.
    THANQ

    Hi,
    ORDERS05
    has probably more fields then ORDERS02
    the one with higher number is newer
    you can find the difference in WE60 by comparing the
    fields
    and because ORDERS05 is the newer one, you will find it not in all R/3 releases!
    So e.g. R/3 3.0 is not working with it possibly!
    you can find many details about IDOCs in:
    The specified item was not found.
    Regards,
    Satish

  • Data plan!  why???  whats the difference of me using Wifi or being charged for a data plan?

    Feature phones iterally suck, even the internet pro reviews on the phones are very low and most of the feature phones that are  reviewed  the reviewer gives  their  last comment as "don't buy" .
    I do not need a data plan, ( I carry either a Verizon netbook or a notebook for all my internet needs) nor am I comfortable with the charge of a data plan being necessary or is this simply another way for a large company with a large profit margin to stick it to the consumer knowing we have to maintain a cell phone in this day and age?.
    I had settled on the KinTwo, the reviews are not glowing but .... r not that horrible either.  It is also the only phone which gives the owner WiFi accessibility.  (which makes me wonder if this is the reason Verizon has pulled it off the market).  From my extensive research the KinTwo is the only feature phone choice.  But..... When I went back to the site to order it was gone, and the VW stores do not carry it.
    UGH>  I am so discouraged by the data plans and the extremely high price.  Would someone please tell me what the difference is in my using my Netbook, laptop (notebook) on WiFi and not being charged a data fee?  Or why I can bring Wireless Internet into my home and have all my WiFi accessible electronics connect through my main ISP with an additional fee for each WiFi user????   But I am not able to use a Smartphone this way???
    I am serious about these data plans  are they necessary????

    once upon a time verizon did not require data plans
    many users were happy
    but t h is did not last for users started having problems with thier hands
    they would often hit the wrong buttons and use data
    sometims as little as a mb, sometimes many mb
    verizon forums and customer service started recieving phone calls to get credits for this usage
    after all its not the users fault is it? i mean are they responsible if they had the phone to a 2 year old to play with and the kid brings up the browser?
    so verizon decided it was in its best interest to protect its users.  they started requireing data plans so you wouldnt get hit with huge bills for being an idiot.
    So if you wanna cry about data plans blame all those people out there that complained

Maybe you are looking for

  • MacBook Pro 15" video card problems (i think)

    Can anyone tell me if this is indeed a video card problem? MBP 15" info (Dec. 2011) Processor 2.4 GHz Intel Core i7 Memory 4GB 1333 MHz DDR3 Graphics Intel HD Graphics 3000 384 MB OS X Lion 10.7.5 This is what happened: I use my mbp heavily because I

  • Disconnected camera appears as connected device - can't get rid of it!

    I recently connected a Samsung Galaxy Tab (SCH-I905) to my Mac, and because it had a photo on it, iPhoto started up and wanted to import the photo.  I did that, and ejected the device and all seemed well. But now whenever I start up iPhoto, the SCH-I

  • IPhone photos not seen in iPhoto - iPhone and iPhoto out of sync

    Normally when I connect my iPhone 3Gs to my iMac, iPhoto '08 opens and my iPhone is recognized and all photos on the phone are shown in iPhoto, ready for import. However, my iPhone and iPhoto now seem out of sync. Without my iPhone connected, I opene

  • JavaBean model

    Hello, I hava a JavaBean class with the following properties: private String attrA; private int attrB; private Set myFriends; // (contains JavaBean objects) private Set myDummys; // (contains Dummy objects) // for this properties the getters and sett

  • Tracking plan figures changes

    Hi mates, how to track history of changed plan data. when and by whom it was changed like that. Is SAP provides any std settings for tracking, if yes where have to go? kindly tell me procedure or steps to follow.. appreciate ur help with points thank