


TypeError: X.prototype.y called on incompatible type.Synta圎rror: invalid regular expression flag "x".Warning: 08/09 is not a legal ECMA-262 octal constant.Warning: -file- is being assigned a //# sourceMappingURL, but already has one.
#BINARY SEQUENCES HOW TO#
How does a programming language know whether to interpret a bit sequence as an integer, a floating point, a text string of Unicode characters, an instruction, or something else? Programming languages differ in how they do this, but there's always some extra bit sequence that encodes the data type of any sequence of bits that tells the computer how to interpret it. This situation was resolved by the IEEE 754 floating point standard, which is now used by every computer manufacturer and has been improved several times since it was created in 1985. Prior to 1985, every model of computer had a slightly different floating point format, and all of them got wrong answers to certain problems. Either you get an exactly correct integer result or, if the result won't fit in integer representation, you get an overflow error and the result is, usually, converted to floating point representation (like 30! was).īy contrast, computer arithmetic on floating point numbers is hard to get exactly right. measureĭepending on the programming language used, an integer might be stored with two or perhaps four bytes of data allowing for a range of about -32,768 to 32,767 (with two bytes) or -2,147,483,648 to 2,147,483,647 (with four bytes).Ĭomputer arithmetic on integers is straightforward. One gigabyte is 2 30 (about 1 billion) bytes, one terabyte is 2 40 (about 1 trillion) bytes, and one petabyte is 2 50 (about 1 quadrillion) bytes. Your hard drive space is likely to be measured in gigabytes, terabytes, or even petabytes. One megabyte is 2 20 (about 1 million) bytes.

These days, your computer memory is likely to be measured in megabytes. We used to measure computer memory in kilobytes one kilobyte is 2 10 (1,024) bytes, which is about 10 3, so we call it a "kilo". A byte is eight bits grouped together like 10001001.Īs computers become more powerful, they are capable of handling more information. Binary sequences are used to represent instructions to the computer and various types of data depending on the context.Ĭomputers store information in binary using bits and bytes. Exclusion Statement (2.1.2B): Range limitations of any one language, compiler, or architecture are beyond the scope of this course and the AP Exam.Ģ.1.2C In many programming languages, the fixed number of bits used to represent real numbers (as floating point numbers) limits the range of floating point values and mathematical operations this limitation can result in round off errors.Ģ.1.2D The interpretation of a binary sequence depends on how it is used.Ģ.1.2E A sequence of bits may represent instructions or data.Ģ.1.2F A sequence of bits may represent different types of data in different contexts.Ħ.2.2K The latency of a system is the time elapsed between the transmission and the receipt of a request.Ħ.2.2J The bandwidth of a system is a measure of bit rate – the amount of data (measured in bits) that can be sent in a fixed amount of time.Īll data is stored in sequences of binary (ones and zeros), and how any binary sequence is interpreted depends on how it will be used. Ģ.1.2A A finite representation is used to model the infinite mathematical concept of a number.Ģ.1.2B In many programming languages, the fixed number of bits used to represent characters or integers limits the range of integer values and mathematical operations this limitation can result in overflow or other errors. 2.1 A variety of abstractions built upon binary sequences can be used to represent all digital data.Ģ.1.2 Explain how binary sequences are used to represent digital data.
