Οι ακέραιοι big-endian είναι δυαδικοί αριθμοί και μερικές φορές επιμελητικοί να εργαστείτε μαζί τους, αλλά το να μπορείτε να κατανοήσετε τα περιεχόμενα τους είναι σημαντικό για τη δημιουργία θεμελιω드經εισης κατανόησης στην επιστήμη των υπολογιστών ή την ηλεκτρολογική μηχανική. Ο όρος "big-endian" προέρχεται από το βιβλίο του Jonathan Swift, "Τα ταξίδια του Γκοάλιβερ". Υπάρχουν δύο πολεμούμενα βασιλεία, τηθυμωμένα αντίστα opposes στο ποιο τέλος ενός ναμμένου με δύο avga αυγού θα πρέπει να κατανεμηθεί πρώτοι. Cei qui cree'un oeuf se mange du bout large sont "big-endian," while their opponents are "little-endian." In binary, it refers to which binary places come first: the most or least significant bits. Determine the format of your number. If the number represents a "signed integer," which can store both positive and negative values, it is in a format called "two's complement." If it represents an "unsigned integer," which can only represent positive values, it requires slightly less manipulation. Write down your number. If yours is a signed integer in two's complement notation, look at the leftmost bit. If it is 0 or your number is an unsigned integer, proceed to the next step and continue as if it were an unsigned integer, as it represents a positive value. If it is 1, replace that bit with a negative sign. Then, flip all the remaining bits, switching 1 to 0, and 0 to 1. Then add 1 to the right-most bit, carrying values if necessary. These bits represent the magnitude of your number. For example, if it turns out to be -42, these bits now represent the "42" part. Write the value of each of the bits under each 1 in your number. The rightmost bit is the 1's columns, just as with decimal numbers. The column to the left is the 2's column, and to the left of that, the 4's column. Each time you move to the left, the value of that column is double the previous column. So, move along in this fashion, writing the value of the column if it's a 1, and nothing if it's a 0. For example, 01101011 would have the numbers 64, 32, 8, 2 and 1 underneath. Sum the numbers you wrote below the 1 bits. For our example from the previous step, we would get 64 + 32 + 8 + 2 + 1 = 107. This sum is the value of your big-endian integer. Bear in mind that if your number is signed and you did have to flip the bits, then this quantity is negative.Things You'll Need
Show More Instructions
Determine a Big-Endian Integer's Value
Πνευματικά δικαιώματα © Γνώση Υπολογιστών Όλα τα δικαιώματα διατηρούνται.