5月12日什么星座| 什么人容易得骨髓瘤| 吃菌子不能吃什么| 培根是什么肉| psy是什么意思| 南瓜和什么相克| sd是什么意思| 音字五行属什么| 积食是什么症状| 什么是孝顺| 酸枣仁配什么治疗失眠| 为什么不来大姨妈也没有怀孕| 麻鸭是什么鸭| 山竹为什么这么贵| 风寒水饮是什么意思| 毛是什么意思| 眩晕症吃什么好| 贴士是什么意思| 人死之前为什么会拉屎| 什么的花蕾| 中国第一长河是什么河| 谷丙转氨酶高挂什么科| 大夫古代指什么| 吃什么可以补黑色素| 放屁特别多是什么原因| 汉城为什么改名叫首尔| 有代沟是什么意思| 准确值是什么意思| 唐僧属什么生肖| 喝什么茶养肝护肝最好| 胃疼想吐是什么原因| 捕风捉影是什么意思| 松鼠代表什么生肖| 什么泡茶好喝| 老是犯困想睡觉是什么原因| 什么是疣图片| 不宁腿综合症吃什么药| 订婚需要准备什么| 高血钙有什么症状| 什么是夹腿| 洋酒是什么酒| 重复肾是什么意思| 垂体饱满是什么意思| 梦见家里办丧事是什么预兆| 湿疹长什么样| 乙肝阻断针什么时候打| 淞字五行属什么| 什么的山谷| 泌尿科主要检查什么| 西游记是什么生肖| 李连杰什么病| h型高血压什么意思| 桑葚和枸杞泡水喝有什么好处| 什么茶叶好喝| 标的是什么| 玉髓是什么玉| 妃是什么意思| 包粽子用什么叶子| mm代表什么| 蓝色与什么色搭配好看| flair呈高信号是什么意思| 事业是什么意思| 软蛋是什么意思| 疫苗是什么| 生目念什么| 令妹是什么意思| 便秘是什么原因引起的| 女人取环什么时候最好| 虚火牙痛吃什么药效果最快| 少一颗牙齿有什么影响| 什么食物蛋白质含量高| 偶发性房性早搏是什么意思| 宫腔粘连带是什么意思| 没精打采是什么意思| 碳14是检查什么的| 吃什么可以补钾| 自什么自什么| 脸油是什么原因导致的| 5月30是什么星座| 作曲是什么意思| pa是什么单位| 1963年是什么年| 什么叫感性的女人| 贡缎是什么面料| 走路带风是什么意思| 人为什么要喝酒| 漏尿是什么原因引起的| 怀孕梦到老公出轨预示什么| 小月子是什么意思| 为什么会有地震| 身披枷锁是什么生肖| IC什么意思| 黄芪最佳搭配是什么| 月亮像什么的比喻句| 长期喝枸杞水有什么好处和坏处| 心气虚吃什么药| 背包客是什么意思| 男性性功能障碍吃什么药| 猪脚焖什么好吃| 蛇进家是什么意思| mizuno是什么品牌| 山楂有什么功效和作用| 为什么会被鬼压床| 什么空调最省电| 什么的舞动| 梵行是什么意思| 为什么身上会痒| 1912年属什么生肖| 否极泰来是什么生肖| 鹿沼土是什么土| 湿气重是什么原因引起的| 复机是什么意思| 中性粒细胞低说明什么| 备货是什么意思| 碟鱼是什么鱼| 什么叫肺纤维化| 病毒感冒吃什么消炎药| 微波炉不能用什么容器| 甘是什么味道| 诙谐幽默是什么意思| 水手服是什么| 高压正常低压低是什么原因| 梦见掉了两颗牙齿是什么意思| 苏轼是什么居士| 二十不惑什么意思| 大排畸什么时候做| 卵生是什么意思| 左卵巢囊性回声什么意思| 胃烧灼感是什么原因引起的| 什么是免疫组化检查| 喉咙疼吃什么消炎药| 偏头痛是什么原因| 热锅上的蚂蚁是什么意思| 肌肉一跳一跳什么原因| 晕车药吃多了有什么副作用| 万病之源是什么| 男人吃洋葱有什么好处| 为什么会面瘫| 打酱油是什么意思| 经常放屁什么原因| 软笔书法是什么| 钙过量会有什么症状| 换什么机油好| 什么水果能马上通便| 血管性头痛吃什么药| 小什么| 梦见打人是什么意思| 头皮发紧是什么病的前兆| 冬至注意什么| 爱恨就在一瞬间是什么歌| 舌头发麻看什么科| 苑字五行属什么| 太史慈姓什么| 左眼皮跳是什么原因| 女性腹部彩超检查什么| 微信屏蔽是什么意思| 什么样的生活| 丑人多作怪什么意思| 尿液发黄是什么病| 不来月经吃什么药| 1971年属什么| 梦见财神爷是什么预兆| 胃酸恶心想吐什么原因| 空调病是什么症状| 荡漾是什么意思| 玑是什么意思| 剖腹产坐月子可以吃什么水果| 南宁晚上有什么好玩的地方| 属鸡的守护神是什么菩萨| 男大女6岁有什么说法| 如意丹的作用是什么| 头疼按什么穴位| 芒果有什么功效| 无花果有什么好处| 眼袋浮肿什么原因| 珠海有什么好玩的| 养狗人容易得什么病| 玉米须加什么治痛风| c罗穿什么足球鞋| 尿酸高吃什么药降尿酸效果好| 胸腔积液吃什么药最有效| 膝盖积水是什么原因造成的| 为什么会得霉菌性阴道炎| 反应蛋白偏高说明什么| 机警是什么意思| 9527是什么梗| 身上冷是什么原因| 体育精神是什么| 嗜酸性气道炎症是什么意思| 三心二意是指什么生肖| 剑玉是什么| 站台是什么意思| 一丝不苟是什么生肖| 蛋白粉有什么营养| 因数是什么意思| 3.14什么星座| 胆囊壁固醇沉积是什么意思| ns什么意思| 双子座和什么座最配对| 后囟门什么时候闭合| 点背是什么意思| 泌尿感染吃什么药| few是什么意思| 蔡英文是什么党| 决明子有什么功效| 26是什么意思| 太岁是什么| 书生是什么生肖| 子宫肌瘤做什么检查能查出来| 脾胃挂什么科| 内膜薄吃什么补得最快| 白细胞高吃什么药| 凤尾是什么菜| 包袱什么意思| 人彘是什么意思| 赫依病是什么病| 联合创始人是什么意思| 塞飞洛是什么档次的包| 什么是pv| 机不可失的下一句是什么| ym是什么衣服品牌| 床咚是什么意思啊| 河粉是什么| 口腔溃疡吃什么水果好| 唾液有臭味是什么原因| 三伏天吃什么水果好| 全友床垫属于什么档次| 君子兰叶子发黄是什么原因| 乌鸡蛋是什么颜色| 四氯化碳什么颜色| 吃什么会变丑脑筋急转弯| 喉痹是什么意思| 蛋花样大便是什么原因| naoh是什么| 第一次坐飞机需要注意什么| 女性外阴痒用什么药| 见好就收是什么意思| 1997年是什么生肖| 高血压能喝什么饮料| 武则天属什么生肖| emg是什么意思| 女性尿道出血是什么原因引起的| 什么是肩袖损伤| 立冬和冬至什么区别| 窦房结内游走性心律是什么意思| 吃什么丰胸效果最好最快| 咳嗽吐白痰吃什么药| 蟋蟀吃什么| 依靠是什么意思| 柠檬黄配什么颜色好看| 头皮癣用什么药膏最好| 上眼皮肿了是什么原因| 白癜风有什么危害| 心悸是什么| 为什么打雷闪电| 打胰岛素有什么副作用| 什么东西比乌鸦更讨厌| 肝回声细密是什么意思| 不稀罕是什么意思| 血氧低有什么症状| 六味地黄丸治什么病| 免疫力是什么意思| 根源是什么意思| 去取环前需做什么准备| 百度

  上海出发不到2.5小时,就能承包这些绝美海岛!

百度 她此次讲话的一个关注重点是可能令她倒向减少加息次数的潜在催化剂。

The program counter (PC),[1] commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR),[2][1] the instruction counter,[3] or just part of the instruction sequencer,[4] is a processor register that indicates where a computer is in its program sequence.[5][nb 1]

Front panel of an IBM 701 computer introduced in 1952. Lights in the middle display the contents of various registers. The instruction counter is at the lower left.

Usually, the PC is incremented after fetching an instruction, and holds the memory address of ("points to") the next instruction that would be executed.[6][nb 2]

Processors usually fetch instructions sequentially from memory, but control transfer instructions change the sequence by placing a new value in the PC. These include branches (sometimes called jumps), subroutine calls, and returns. A transfer that is conditional on the truth of some assertion lets the computer follow a different sequence under different conditions.

A branch provides that the next instruction is fetched from elsewhere in memory. A subroutine call not only branches but saves the preceding contents of the PC somewhere. A return retrieves the saved contents of the PC and places it back in the PC, resuming sequential execution with the instruction following the subroutine call.

Hardware implementation

edit

In a simple central processing unit (CPU), the PC is a digital counter (which is the origin of the term "program counter") that may be one of several hardware registers. The instruction cycle[8] begins with a fetch, in which the CPU places the value of the PC on the address bus to send it to the memory. The memory responds by sending the contents of that memory location on the data bus. (This is the stored-program computer model, in which a single memory space contains both executable instructions and ordinary data.[9]) Following the fetch, the CPU proceeds to execution, taking some action based on the memory contents that it obtained. At some point in this cycle, the PC will be modified so that the next instruction executed is a different one (typically, incremented so that the next instruction is the one starting at the memory address immediately following the last memory location of the current instruction).

Like other processor registers, the PC may be a bank of binary latches, each one representing one bit of the value of the PC.[10] The number of bits (the width of the PC) relates to the processor architecture. For instance, a “32-bit” CPU may use 32 bits to be able to address 232 units of memory. On some processors, the width of the program counter instead depends on the addressable memory; for example, some AVR microcontrollers have a PC which wraps around after 12 bits.[11]

If the PC is a binary counter, it may increment when a pulse is applied to its COUNT UP input, or the CPU may compute some other value and load it into the PC by a pulse to its LOAD input.[12]

To identify the current instruction, the PC may be combined with other registers that identify a segment or page. This approach permits a PC with fewer bits by assuming that most memory units of interest are within the current vicinity.

Consequences in machine architecture

edit

Use of a PC that normally increments assumes that what a computer does is execute a usually linear sequence of instructions. Such a PC is central to the von Neumann architecture. Thus programmers write a sequential control flow even for algorithms that do not have to be sequential. The resulting “von Neumann bottleneck” led to research into parallel computing,[13] including non-von Neumann or dataflow models that did not use a PC; for example, rather than specifying sequential steps, the high-level programmer might specify desired function and the low-level programmer might specify this using combinatory logic.

This research also led to ways to making conventional, PC-based, CPUs run faster, including:

  • Pipelining, in which different hardware in the CPU executes different phases of multiple instructions simultaneously.
  • The very long instruction word (VLIW) architecture, where a single instruction can achieve multiple effects.
  • Techniques to predict out-of-order execution and prepare subsequent instructions for execution outside the regular sequence.

Consequences in high-level programming

edit

Modern high-level programming languages still follow the sequential-execution model and, indeed, a common way of identifying programming errors is with a “procedure execution” in which the programmer's finger identifies the point of execution as a PC would. The high-level language is essentially the machine language of a virtual machine,[14] too complex to be built as hardware but instead emulated or interpreted by software.

However, new programming models transcend sequential-execution programming:

  • When writing a multi-threaded program, the programmer may write each thread as a sequence of instructions without specifying the timing of any instruction relative to instructions in other threads.
  • In event-driven programming, the programmer may write sequences of instructions to respond to events without specifying an overall sequence for the program.
  • In dataflow programming, the programmer may write each section of a computing pipeline without specifying the timing relative to other sections.

See also

edit

Notes

edit
  1. ^ For modern processors, the concept of "where it is in its sequence" is too simplistic, as instruction-level parallelism and out-of-order execution may occur.
  2. ^ In a processor where the incrementation precedes the fetch, the PC points to the current instruction being executed. In some processors, the PC points some distance beyond the current instruction; for instance, in the ARM7, the value of PC visible to the programmer points beyond the current instruction and beyond the delay slot.[7]

References

edit
  1. ^ a b Hayes, John P. (1978). Computer Architecture and Organization. McGraw-Hill. p. 245. ISBN 0-07-027363-4.
  2. ^ Mead, Carver; Conway, Lynn (1980). Introduction to VLSI Systems. Reading, USA: Addison-Wesley. ISBN 0-201-04358-0.
  3. ^ Principles of Operation, Type 701 and Associated Equipment (PDF). IBM. 1953.
  4. ^ Harry Katzan (1971), Computer Organization and the System/370, Van Nostrand Reinhold Company, New York, USA, LCCCN 72-153191
  5. ^ Bates, Martin (2011). "Microcontroller Operation". PIC Microcontrollers. Elsevier. pp. 27–44. doi:10.1016/b978-0-08-096911-4.10002-3. ISBN 978-0-08-096911-4. Program Counter (PC) is a register that keeps track of the program sequence, by storing the address of the instruction currently being executed. It is automatically loaded with zero when the chip is powered up or reset. As each instruction is executed, PC is incremented (increased by one) to point to the next instruction.
  6. ^ Silberschatz, Abraham; Gagne, Greg; Galvin, Peter B. (April 2018). Operating System Concepts. United States: Wiley. pp. 27, G-29. ISBN 978-1-119-32091-3.
  7. ^ "ARM Developer Suite, Assembler Guide. Version 1.2". ARM Limited. 2001. Retrieved 2025-08-05.
  8. ^ John L. Hennessy and David A. Patterson (1990), Computer Architecture: a quantitative approach, Morgan Kaufmann Publishers, Palo Alto, USA, ISBN 1-55860-069-8
  9. ^ B. Randall (1982), The Origins of Digital Computers, Springer-Verlag, Berlin, D
  10. ^ C. Gordon Bell and Allen Newell (1971), Computer Structures: Readings and Examples, McGraw-Hill Book Company, New York, USA
  11. ^ Arnold, Alfred (2020) [1996, 1989]. "E. Predefined Symbols". Macro Assembler AS – User's Manual. V1.42. Translated by Arnold, Alfred; Hilse, Stefan; Kanthak, Stephan; Sellke, Oliver; De Tomasi, Vittorio. p. Table E.3: Predefined Symbols – Part 3. Archived from the original on 2025-08-05. Retrieved 2025-08-05. 3.2.12. WRAPMODE […] AS will assume that the processor's program counter does not have the full length of 16 bits given by the architecture, but instead a length that is exactly sufficient to address the internal ROM. For example, in case of the AT90S8515, this means 12 bits, corresponding to 4 Kwords or 8 Kbytes. This assumption allows relative branches from the ROM's beginning to the end and vice versa which would result in an out-of-branch error when using strict arithmetics. Here, they work because the carry bits resulting from the target address computation are discarded. […] In case of the abovementioned AT90S8515, this option is even necessary because it is the only way to perform a direct jump through the complete address space […]
  12. ^ Walker, B. S. (1967). Introduction to Computer Engineering. London, UK: University of London Press. ISBN 0-340-06831-0.
  13. ^ F. B. Chambers, D. A. Duce and G. P. Jones (1984), Distributed Computing, Academic Press, Orlando, USA, ISBN 0-12-167350-2
  14. ^ Douglas Hofstadter (1980), G?del, Escher, Bach: an eternal golden braid, Penguin Books, Harmondsworth, UK, ISBN 0-14-005579-7
算了吧什么意思 胆囊壁增厚是什么意思 黄连泡水喝有什么功效 梦见死人了是什么预兆 知音是什么意思
年轻人为什么会低血压 晚上喝什么茶有助于睡眠 1980年属什么 中药用什么锅熬效果最佳 跨界歌手是什么意思
叶酸不能和什么一起吃 交公粮是什么意思 女人吃什么补月牙最快 pet是什么检查 什么已经什么
公立医院和私立医院有什么区别 检查肺结节挂什么科 翻什么越什么 linen是什么面料成分 ct平扫能检查出什么
膝盖痛吃什么药好hcv9jop5ns5r.cn 伽马刀是什么意思hcv9jop2ns3r.cn 猫靠什么散热travellingsim.com 木瓜什么味道hkuteam.com 什么防晒霜好用hcv8jop7ns6r.cn
打胶原蛋白针有什么副作用吗helloaicloud.com 梦见儿子小时候是什么意思hcv8jop8ns8r.cn 身上皮肤痒是什么原因hcv9jop6ns9r.cn 一路长虹什么意思hcv9jop6ns3r.cn 学痞是什么意思hcv8jop0ns9r.cn
什么食物补血效果最好最快cj623037.com 鼻子干燥吃什么中成药hcv9jop3ns5r.cn 尿常规阳性是什么意思inbungee.com 尿道口为什么叫马眼hcv9jop5ns7r.cn 北京晚上有什么好玩的景点hcv9jop3ns3r.cn
孕妇贫血对胎儿有什么影响hcv9jop5ns8r.cn 语无伦次是什么意思hcv9jop5ns8r.cn 土豆不能和什么食物一起吃bfb118.com 真丝姆米是什么意思0297y7.com 开救护车需要什么驾照jingluanji.com
百度