Knowledge

State (computer science)

Source 📝

180:. Serial programs operate on the incoming data characters or packets sequentially, one at a time. In some of these programs, information about previous data characters or packets received is stored in variables and used to affect the processing of the current character or packet. This is called a 276:. To change the channel of a TV, the user usually presses a channel up or channel down button on the remote control, which sends a coded message to the set. In order to calculate the new channel that the user desires, the digital tuner in the television must have stored in it the number of the 54:. The system's internal behaviour or interaction with its environment consists of separately occurring individual actions or events, such as accepting input or producing output, that may or may not cause the system to change its state. Examples of such systems are 206:) that describes computation in terms of the program state, and of the statements which change the program state. Changes of state are implicit, managed by the program runtime, so that a subroutine has 104:, whose outputs are a function of both the current inputs and the past history of inputs. In sequential logic, information from past inputs is stored in electronic memory elements, such as 280:
it is on. It then adds one or subtracts one from this number to get the number for the new channel, and adjusts the TV to receive that channel. This new number is then stored as the
252:
memory element has only two possible states, 0 or 1, the total number of different states a circuit can assume is finite, and fixed by the number of memory elements. If there are
300:, which preserves the information when the TV is turned off, so when it is turned on again the TV will return to its previous station and volume level. 288:
produced by the speaker. Pressing the volume up or volume down buttons increments or decrements this number, setting a new level of volume. Both the
248:
The output of a sequential circuit or computer program at any time is completely determined by its current inputs and current state. Since each
256:
binary memory elements, a digital circuit can have at most 2 distinct states. The concept of state is formalized in an abstract mathematical
188:. In others, the program has no information about the previous data stream and starts fresh with each data input; this is called a 523: 496: 331:, so it can be restored when the computer comes out of hibernation, and the processor can take up operations where it left off. 232:
as explicit variables that represent the program state at each step of a program execution: a state variable is passed as an
127:, and there is a finite number of memory elements, a digital circuit has only a certain finite number of possible states. If 469: 533: 506: 479: 442: 415: 388: 108:. The stored contents of these memory elements, at a given point in time, is collectively referred to as the circuit's 153:. The contents of these memory locations, at any given point in the program's execution, are called the program's 559: 211: 160:
A more specialized definition of state is used for computer programs that operate serially or sequentially on
31:
if it is designed to remember preceding events or user interactions; the remembered information is called the
207: 133:
is the number of binary memory elements in the circuit, the maximum number of states a circuit can have is
97: 405: 378: 146: 221:
languages, the program describes the desired results and doesn't specify changes to the state directly.
327:
to save energy by shutting down the processor, the state of the processor is stored on the computer's
240:
subroutine only has visibility of changes of state represented by the state variables in its scope.
308: 236:
of a state-transforming function, which returns the updated state as part of its return value. A
218: 105: 78: 225: 195: 173: 20: 432: 261: 257: 203: 199: 169: 116: 8: 297: 93: 554: 312: 189: 161: 529: 502: 475: 438: 411: 384: 181: 359: 340: 324: 320: 101: 67: 24: 498:
A Discipline of Multiprogramming: Programming Theory for Distributed Applications
237: 233: 150: 112:
and contains all the information about the past to which the circuit has access.
63: 59: 43: 304: 273: 229: 407:
Digital Integrated Circuit Design: From VLSI Architectures to CMOS Fabrication
548: 89: 55: 284:. Similarly, the television also stores a number that controls the level of 249: 184:
and the data carried over from the previous processing cycle is called the
81:
at any time is completely determined by its current inputs and its state.
264:, used to design both sequential digital circuits and computer programs. 39: 316: 177: 51: 328: 210:
of the changes of state made by other parts of the program, known as
47: 285: 71: 165: 471:
Dictionary of Computer Science, Engineering and Technology
296:
numbers are part of the TV's state. They are stored in
272:
An example of an everyday device that has a state is a
307:
is the contents of all the memory elements in it: the
38:
The set of states a system can occupy is known as its
119:, such as a flip-flop, has only two possible states, 100:
are dependent only on its present input signals, and
360:"What is stateless? - Definition from WhatIs.com" 546: 437:. Prentice-Hall of India Pvt. Ltd. p. 326. 434:8085 Microprocessor: Programming and Interfacing 410:. UK: Cambridge University Press. p. 735. 377:Harris, David Money; Harris, Sarah L. (2007). 84: 145:Similarly, a computer program stores data in 376: 149:, which represent storage locations in the 16:Remembered information in a computer system 323:. When computers such as laptops go into 467: 380:Digital Design and Computer Architecture 243: 92:circuits can be divided into two types: 528:. Pearson Education. pp. 113–114. 461: 430: 403: 547: 424: 397: 521: 494: 383:. USA: Morgan Kaufmann. p. 103. 370: 515: 488: 228:, state is usually represented with 303:As another example, the state of a 77:The output of a digital circuit or 13: 14: 571: 140: 474:. USA: CRC Press. p. 466. 431:Srinath, N. K. (August 2005). 352: 79:deterministic computer program 1: 522:Prata, Stephen Prata (2004). 346: 468:Laplante, Philip A. (2000). 7: 334: 267: 85:Digital logic circuit state 27:, a system is described as 10: 576: 58:circuits and components, 501:. Springer. p. 14. 404:Kaeslin, Hubert (2008). 495:Misra, Jayadev (2001). 219:declarative programming 174:communication protocols 226:functional programming 196:Imperative programming 21:information technology 560:Models of computation 525:C Primer Plus, 5th Ed 244:Finite state machines 117:binary memory element 46:, the state space is 262:finite state machine 258:model of computation 204:programming language 202:(way of designing a 200:programming paradigm 298:non-volatile memory 94:combinational logic 190:stateless protocol 313:storage registers 182:stateful protocol 151:computer's memory 68:computer programs 567: 540: 539: 519: 513: 512: 492: 486: 485: 465: 459: 458: 453: 451: 428: 422: 421: 401: 395: 394: 374: 368: 367: 356: 341:Data (computing) 325:hibernation mode 102:sequential logic 25:computer science 575: 574: 570: 569: 568: 566: 565: 564: 545: 544: 543: 536: 520: 516: 509: 493: 489: 482: 466: 462: 449: 447: 445: 429: 425: 418: 402: 398: 391: 375: 371: 358: 357: 353: 349: 337: 290:current channel 282:current channel 278:current channel 270: 246: 238:pure functional 234:input parameter 162:streams of data 143: 96:, whose output 87: 64:formal language 44:discrete system 35:of the system. 17: 12: 11: 5: 573: 563: 562: 557: 542: 541: 535:978-0132713603 534: 514: 508:978-0387952062 507: 487: 481:978-0849326912 480: 460: 444:978-8120327856 443: 423: 417:978-0521882675 416: 396: 390:978-0123704979 389: 369: 364:techtarget.com 350: 348: 345: 344: 343: 336: 333: 305:microprocessor 294:current volume 274:television set 269: 266: 245: 242: 230:temporal logic 142: 139: 86: 83: 15: 9: 6: 4: 3: 2: 572: 561: 558: 556: 553: 552: 550: 537: 531: 527: 526: 518: 510: 504: 500: 499: 491: 483: 477: 473: 472: 464: 457: 446: 440: 436: 435: 427: 419: 413: 409: 408: 400: 392: 386: 382: 381: 373: 365: 361: 355: 351: 342: 339: 338: 332: 330: 326: 322: 318: 314: 310: 306: 301: 299: 295: 291: 287: 283: 279: 275: 265: 263: 259: 255: 251: 241: 239: 235: 231: 227: 222: 220: 215: 213: 209: 205: 201: 197: 193: 191: 187: 183: 179: 175: 171: 167: 163: 158: 156: 152: 148: 141:Program state 138: 136: 132: 131: 126: 122: 118: 113: 111: 107: 103: 99: 95: 91: 90:Digital logic 82: 80: 75: 73: 69: 65: 61: 57: 56:digital logic 53: 49: 45: 41: 36: 34: 30: 26: 22: 524: 517: 497: 490: 470: 463: 455: 448:. Retrieved 433: 426: 406: 399: 379: 372: 363: 354: 309:accumulators 302: 293: 289: 281: 277: 271: 253: 247: 223: 216: 212:side effects 194: 185: 159: 154: 144: 134: 129: 128: 124: 120: 114: 109: 88: 76: 37: 32: 28: 18: 317:data caches 115:Since each 40:state space 549:Categories 450:7 December 347:References 208:visibility 178:encryption 164:, such as 106:flip-flops 50:and often 555:Cognition 329:hard disk 260:called a 170:firewalls 147:variables 72:computers 48:countable 335:See also 268:Examples 60:automata 29:stateful 456:page 46 166:parsers 98:signals 42:. In a 532:  505:  478:  441:  414:  387:  319:, and 286:volume 250:binary 70:, and 52:finite 321:flags 198:is a 186:state 155:state 110:state 33:state 530:ISBN 503:ISBN 476:ISBN 452:2012 439:ISBN 412:ISBN 385:ISBN 292:and 176:and 125:zero 74:. 62:and 23:and 224:In 217:In 123:or 121:one 19:In 551:: 454:. 362:. 315:, 311:, 214:. 192:. 172:, 168:, 157:. 137:. 66:, 538:. 511:. 484:. 420:. 393:. 366:. 254:N 135:2 130:N

Index

information technology
computer science
state space
discrete system
countable
finite
digital logic
automata
formal language
computer programs
computers
deterministic computer program
Digital logic
combinational logic
signals
sequential logic
flip-flops
binary memory element
variables
computer's memory
streams of data
parsers
firewalls
communication protocols
encryption
stateful protocol
stateless protocol
Imperative programming
programming paradigm
programming language

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.