text:
BASIC

BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College in 1963. They wanted to enable students in non-scientific fields to use computers. At the time, nearly all computers required writing custom software, which only scientists and mathematicians tended to learn.

In addition to the programming language, Kemeny and Kurtz developed the Dartmouth Time Sharing System (DTSS), which allowed multiple users to edit and run BASIC programs simultaneously on remote terminals. This general model became popular on minicomputer systems like the PDP-11 and Data General Nova in the late 1960s and early 1970s. Hewlett-Packard produced an entire computer line for this method of operation, introducing the HP2000 series in the late 1960s and continuing sales into the 1980s. Many early video games trace their history to one of these versions of BASIC.

The emergence of microcomputers in the mid-1970s led to the development of multiple BASIC dialects, including Microsoft BASIC in 1975. Due to the tiny main memory available on these machines, often 4 KB, a variety of Tiny BASIC dialects were also created. BASIC was available for almost any system of the era, and became the de facto programming language for home computer systems that emerged in the late 1970s. These PCs almost always had a BASIC interpreter installed by default, often in the machine's firmware or sometimes on a ROM cartridge.

BASIC declined in popularity in the 1990s, as more powerful microcomputers came to market and programming languages with advanced features (such as Pascal and C) became tenable on such computers. By then, most nontechnical personal computer users relied on pre-written applications rather than writing their own programs. In 1991, Microsoft released Visual Basic, combining an updated version of BASIC with a visual forms builder. This reignited use of the language and "VB" remains a major programming language in the form of VB.NET, while a hobbyist scene for BASIC more broadly continues to exist.

Origin
John G. Kemeny was the chairman of the Dartmouth College Mathematics Department. Based largely on his reputation as an innovator in math teaching, in 1959 the College won an Alfred P. Sloan Foundation award for $500,000 to build a new department building. Thomas E. Kurtz had joined the department in 1956, and from the 1960s Kemeny and Kurtz agreed on the need for programming literacy among students outside the traditional STEM fields. Kemeny later noted that "Our vision was that every student on campus should have access to a computer, and any faculty member should be able to use a computer in the classroom whenever appropriate. It was as simple as that."

Kemeny and Kurtz had made two previous experiments with simplified languages, DARSIMCO (Dartmouth Simplified Code) and DOPE (Dartmouth Oversimplified Programming Experiment). These did not progress past a single freshman class. New experiments using Fortran and ALGOL followed, but Kurtz concluded these languages were too tricky for what they desired. As Kurtz noted, Fortran had numerous oddly formed commands, notably an "almost impossible-to-memorize convention for specifying a loop: DO 100, I = 1, 10, 2. Is it '1, 10, 2' or '1, 2, 10', and is the comma after the line number required or not?"

Moreover, the lack of any sort of immediate feedback was a key problem; the machines of the era used batch processing and took a long time to complete a run of a program. While Kurtz was visiting MIT, John McCarthy suggested that time-sharing offered a solution; a single machine could divide up its processing time among many users, giving them the illusion of having a (slow) computer to themselves. Small programs would return results in a few seconds. This led to increasing interest in a system using time-sharing and a new language specifically for use by non-STEM students.

Kemeny wrote the first version of BASIC. The acronym BASIC comes from the name of an unpublished paper by Thomas Kurtz. The new language was heavily patterned on FORTRAN II; statements were one-to-a-line, numbers were used to indicate the target of loops and branches, and many of the commands were similar or identical to Fortran. However, the syntax was changed wherever it could be improved. For instance, the difficult to remember  loop was replaced by the much easier to remember FOR I = 1 TO 10 STEP 2, and the line number used in the DO was instead indicated by the. Likewise, the cryptic  statement of Fortran, whose syntax matched a particular instruction of the machine on which it was originally written, became the simpler IF I=5 THEN GOTO 100. These changes made the language much less idiosyncratic while still having an overall structure and feel similar to the original FORTRAN.

The project received a $300,000 grant from the National Science Foundation, which was used to purchase a GE-225 computer for processing, and a Datanet-30 realtime processor to handle the Teletype Model 33 teleprinters used for input and output. A team of a dozen undergraduates worked on the project for about a year, writing both the DTSS system and the BASIC compiler. The first version BASIC language was released on 1 May 1964.

Initially, BASIC concentrated on supporting straightforward mathematical work, with- matrix arithmetic support from its initial implementation as a batch language, and character string functionality being added by 1965. Usage in the university rapidly expanded, requiring the main CPU to be replaced by a GE-235, and still later by a GE-635. By the early 1970s there were hundreds of terminals connected to the machines at Dartmouth, some of them remotely.

Wanting use of the language to become widespread, its designers made the compiler available free of charge. In the 1960s, software became a chargeable commodity; until then, it was provided without charge as a service with expensive computers, usually available only to lease. They also made it available to high schools in the Hanover, New Hampshire, area and regionally throughout New England on Teletype Model 33 and Model 35 teleprinter terminals connected to Dartmouth via dial-up phone lines, and they put considerable effort into promoting the language. In the following years, as other dialects of BASIC appeared, Kemeny and Kurtz's original BASIC dialect became known as Dartmouth BASIC.

New Hampshire recognized the accomplishment in 2019 when it erected a highway historical marker in Hanover describing the creation of "the first user-friendly programming language".

Spread on time-sharing services
The emergence of BASIC took place as part of a wider movement toward time-sharing systems. First conceptualized during the late 1950s, the idea became so dominant in the computer industry by the early 1960s that its proponents were speaking of a future in which users would "buy time on the computer much the same way that the average household buys power and water from utility companies".

General Electric, having worked on the Dartmouth project, wrote their own underlying operating system and launched an online time-sharing system known as Mark I. It featured BASIC as one of its primary selling points. Other companies in the emerging field quickly followed suit; Tymshare introduced SUPER BASIC in 1968, CompuServe had a version on the DEC-10 at their launch in 1969, and by the early 1970s BASIC was largely universal on general-purpose mainframe computers. Even IBM eventually joined the club with the introduction of VS-BASIC in 1973.

Although time-sharing services with BASIC were successful for a time, the widespread success predicted earlier was not to be. The emergence of minicomputers during the same period, and especially low-cost microcomputers in the mid-1970s, allowed anyone to purchase and run their own systems rather than buy online time which was typically billed at dollars per minute.

Spread on minicomputers

BASIC, by its very nature of being small, was naturally suited to porting to the minicomputer market, which was emerging at the same time as the time-sharing services. These machines had small main memory, perhaps as little as 4 KB in modern terminology, and lacked high-performance storage like hard drives that make compilers practical. On these systems, BASIC was normally implemented as an interpreter rather than a compiler due to its lower requirement for working memory.

A particularly important example was HP Time-Shared BASIC, which, like the original Dartmouth system, used two computers working together to implement a time-sharing system. The first, a low-end machine in the HP 2100 series, was used to control user input and save and load their programs to tape or disk. The other, a high-end version of the same underlying machine, ran the programs and generated output. For a cost of about $100,000, one could own a machine capable of running between 16 and 32 users at the same time. The system, bundled as the HP 2000, was the first mini platform to offer time-sharing and was an immediate runaway success, catapulting HP to become the third-largest vendor in the minicomputer space, behind DEC and Data General (DG).

DEC, the leader in the minicomputer space since the mid-1960s, had initially ignored BASIC. This was due to their work with RAND Corporation, who had purchased a PDP-6 to run their JOSS language, which was conceptually very similar to BASIC. This led DEC to introduce a smaller, cleaned up version of JOSS known as FOCAL, which they heavily promoted in the late 1960s. However, with timesharing systems widely offering BASIC, and all of their competition in the minicomputer space doing the same, DEC's customers were clamoring for BASIC. After management repeatedly ignored their pleas, David H. Ahl took it upon himself to buy a BASIC for the PDP-8, which was a major success in the education market. By the early 1970s, FOCAL and JOSS had been forgotten and BASIC had become almost universal in the minicomputer market. DEC would go on to introduce their updated version, BASIC-PLUS, for use on the RSTS/E time-sharing operating system.

During this period a number of simple text-based games were written in BASIC, most notably Mike Mayfield's Star Trek. David Ahl collected these, some ported from FOCAL, and published them in an educational newsletter he compiled. He later collected a number of these into book form, 101 BASIC Computer Games, published in 1973. During the same period, Ahl was involved in the creation of a small computer for education use, an early personal computer. When management refused to support the concept, Ahl left DEC in 1974 to found the seminal computer magazine, Creative Computing. The book remained popular, and was re-published on several occasions.

Explosive growth: the home computer era

The introduction of the first microcomputers in the mid-1970s was the start of explosive growth for BASIC. It had the advantage that it was fairly well known to the young designers and computer hobbyists who took an interest in microcomputers, many of whom had seen BASIC on minis or mainframes. Despite Dijkstra's famous judgement in 1975, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration", BASIC was one of the few languages that was both high-level enough to be usable by those without training and small enough to fit into the microcomputers of the day, making it the de facto standard programming language on early microcomputers.

The first microcomputer version of BASIC was co-written by Bill Gates, Paul Allen and Monte Davidoff for their newly formed company, Micro-Soft. This was released by MITS in punch tape format for the Altair 8800 shortly after the machine itself, immediately cementing BASIC as the primary language of early microcomputers. Members of the Homebrew Computer Club began circulating copies of the program, causing Gates to write his Open Letter to Hobbyists, complaining about this early example of software piracy.

Partially in response to Gates's letter, and partially to make an even smaller BASIC that would run usefully on 4 KB machines, Bob Albrecht urged Dennis Allison to write their own variation of the language. How to design and implement a stripped-down version of an interpreter for the BASIC language was covered in articles by Allison in the first three quarterly issues of the People's Computer Company newsletter published in 1975 and implementations with source code published in Dr. Dobb's Journal of Tiny BASIC Calisthenics & Orthodontia: Running Light Without Overbyte. This led to a wide variety of Tiny BASICs with added features or other improvements, with versions from Tom Pittman and Li-Chen Wang becoming particularly well known.

Micro-Soft, by this time Microsoft, ported their interpreter for the MOS 6502, which quickly become one of the most popular microprocessors of the 8-bit era. When new microcomputers began to appear, notably the "1977 trinity" of the TRS-80, Commodore PET and Apple II, they either included a version of the MS code, or quickly introduced new models with it. Ohio Scientific's personal computers also joined this trend at that time. By 1978, MS BASIC was a de facto standard and practically every home computer of the 1980s included it in ROM. Upon boot, a BASIC interpreter in direct mode was presented.

Commodore Business Machines includes Commodore BASIC, based on Microsoft BASIC. The Apple II and TRS-80 each have two versions of BASIC: a smaller introductory version with the initial releases of the machines and a Microsoft-based version introduced as interest in the platforms increased. As new companies entered the field, additional versions were added that subtly changed the BASIC family. The Atari 8-bit computers use the 8 KB Atari BASIC which is not derived from Microsoft BASIC. Sinclair BASIC was introduced in 1980 with the Sinclair ZX80, and was later extended for the Sinclair ZX81 and the Sinclair ZX Spectrum. The BBC published BBC BASIC, developed by Acorn Computers, incorporates extra structured programming keywords and floating-point features.

As the popularity of BASIC grew in this period, computer magazines published complete source code in BASIC for video games, utilities, and other programs. Given BASIC's straightforward nature, it was a simple matter to type in the code from the magazine and execute the program. Different magazines were published featuring programs for specific computers, though some BASIC programs were considered universal and could be used in machines running any variant of BASIC (sometimes with minor adaptations). Many books of type-in programs were also available, and in particular, Ahl published versions of the original 101 BASIC games converted into the Microsoft dialect and published it from Creative Computing as BASIC Computer Games. This book, and its sequels, provided hundreds of ready-to-go programs that could be easily converted to practically any BASIC-running platform. The book reached the stores in 1978, just as the home computer market was starting off, and it became the first million-selling computer book. Later packages, such as Learn to Program BASIC would also have gaming as an introductory focus. On the business-focused CP/M computers which soon became widespread in small business environments, Microsoft BASIC (MBASIC) was one of the leading applications.

In 1978, David Lien published the first edition of The BASIC Handbook: An Encyclopedia of the BASIC Computer Language, documenting keywords across over 78 different computers. By 1981, the second edition documented keywords from over 250 different computers, showcasing the explosive growth of the microcomputer era.

IBM PC and compatibles

When IBM was designing the IBM PC, they followed the paradigm of existing home computers in having a built-in BASIC interpreter. They sourced this from Microsoft – IBM Cassette BASIC – but Microsoft also produced several other versions of BASIC for MS-DOS/PC DOS including IBM Disk BASIC (BASIC D), IBM BASICA (BASIC A), GW-BASIC (a BASICA-compatible version that did not need IBM's ROM) and QBasic, all typically bundled with the machine. In addition they produced the Microsoft BASIC Compiler aimed at professional programmers. Turbo Pascal-publisher Borland published Turbo Basic 1.0 in 1985 (successor versions are still being marketed under the name PowerBASIC). On Unix-like systems, specialized implementations were created such as XBasic and X11-Basic. XBasic was ported to Microsoft Windows as XBLite, and cross-platform variants such as SmallBasic, yabasic, Bywater BASIC, nuBasic, MyBasic, Logic Basic, Liberty BASIC, and wxBasic emerged. FutureBASIC and Chipmunk Basic meanwhile targeted the Apple Macintosh, while yab is a version of yaBasic optimized for BeOS, ZETA and Haiku.

These later variations introduced many extensions, such as improved string manipulation and graphics support, access to the file system and additional data types. More important were the facilities for structured programming, including additional control structures and proper subroutines supporting local variables. However, by the latter half of the 1980s, users were increasingly using pre-made applications written by others rather than learning programming themselves; while professional programmers now had a wide range of more advanced languages available on small computers. C and later C++ became the languages of choice for professional "shrink wrap" application development.

A niche that BASIC continued to fill was for hobbyist video game development, as game creation systems and readily available game engines were still in their infancy. The Atari ST had STOS BASIC while the Amiga had AMOS BASIC for this purpose. Microsoft first exhibited BASIC for game development with DONKEY.BAS for GW-BASIC, and later GORILLA.BAS and NIBBLES.BAS for QuickBASIC. QBasic maintained an active game development community, which helped later spawn the QB64 and FreeBASIC implementations. In 2013 a game written in QBasic and compiled with QB64 for modern computers entitled Black Annex was released on Steam. Blitz Basic, Dark Basic, SdlBasic, Super Game System Basic, PlayBASIC, CoolBasic, AllegroBASIC, ethosBASIC, GLBasic and Basic4GL further filled this demand, right up to the modern RCBasic, NaaLaa, AppGameKit, Monkey 2 and Cerberus-X.

Visual Basic
In 1991, Microsoft introduced Visual Basic, an evolutionary development of QuickBASIC. It included constructs from that language such as block-structured control statements, parameterized subroutines and optional static typing as well as object-oriented constructs from other languages such as "With" and "For Each". The language retained some compatibility with its predecessors, such as the Dim keyword for declarations, "Gosub"/Return statements and optional line numbers which could be used to locate errors. An important driver for the development of Visual Basic was as the new macro language for Microsoft Excel, a spreadsheet program. To the surprise of many at Microsoft who still initially marketed it as a language for hobbyists, the language came into widespread use for small custom business applications shortly after the release of VB version 3.0, which is widely considered the first relatively stable version. Microsoft also spun it off as Visual Basic for Applications and Embedded Visual Basic.

While many advanced programmers still scoffed at its use, VB met the needs of small businesses efficiently as by that time, computers running Windows 3.1 had become fast enough that many business-related processes could be completed "in the blink of an eye" even using a "slow" language, as long as large amounts of data were not involved. Many small business owners found they could create their own small, yet useful applications in a few evenings to meet their own specialized needs. Eventually, during the lengthy lifetime of VB3, knowledge of Visual Basic had become a marketable job skill. Microsoft also produced VBScript in 1996 and Visual Basic .NET in 2001. The latter has essentially the same power as C# and Java but with syntax that reflects the original Basic language, and also features some cross-platform capability through implementations such as Mono-Basic. The IDE, with its event-driven GUI builder, was also influential on other rapid application development tools, most notably Borland Software's Delphi for Object Pascal and its own descendants such as Lazarus.

Mainstream support for the final version 6.0 of the original Visual Basic ended on March 31, 2005, followed by extended support in March 2008. Owing to its persistent remaining popularity, third-party attempts to further support it, such as Rubberduck and ModernVB, exist. On February 2, 2017 Microsoft announced that development on VB.NET would no longer be in parallel with that of C#, and on March 11, 2020 it was announced that evolution of the VB.NET language had also concluded. Even so, the language was still supported and the third-party Mercury extension has since been produced. Meanwhile, competitors exist such as B4X, RAD Basic, twinBASIC, VisualFBEditor, InForm, Xojo, and Gambas.

Post-1990 versions and dialects
Many other BASIC dialects have also sprung up since 1990, including the open source QB64 and FreeBASIC, inspired by QBasic, and the Visual Basic-styled RapidQ, HBasic, Basic For Qt and Gambas. Modern commercial incarnations include PureBasic, PowerBASIC, Xojo, Monkey X and True BASIC (the direct successor to Dartmouth BASIC from a company controlled by Kurtz).

Several web-based simple BASIC interpreters also now exist, including Quite Basic by Nikko Strom, as well as Microsoft's Small Basic and Google's wwwBASIC. A number of compilers also exist that convert BASIC into JavaScript, such as JSBasic which re-implements Applesoft BASIC, Spider BASIC, and NS Basic.

Building from earlier efforts such as Mobile Basic and CellularBASIC, many dialects are now available for smartphones and tablets. Through the Apple App Store for iOS options include Hand BASIC, Learn BASIC, Smart Basic based on Minimal BASIC, Basic! by miSoft, and BASIC by Anastasia Kovba. The Google Play store for Android meanwhile has the touchscreen focused Touch Basic, B4A, the RFO BASIC! interpreter based on Dartmouth Basic, and adaptations of SmallBasic, BBC Basic, Tiny Basic, X11-Basic, and NS Basic.

On game consoles, an application for the Nintendo 3DS and Nintendo DSi called Petit Computer allows for programming in a slightly modified version of BASIC with DS button support. A version has also been released for Nintendo Switch, which has also been supplied a version of the Fuze Code System, a BASIC variant first implemented as a custom Raspberry Pi machine. Previously BASIC was made available on consoles as Family BASIC (for the Nintendo Famicom) and PSX Chipmunk Basic (for the original PlayStation), while yabasic was ported to the PlayStation 2 and FreeBASIC to the original Xbox. Dragon BASIC was created for homebrew on the Game Boy Advance and Nintendo DS, with NEXTBasic, BasiEgaXorz and SecondBASIC being created for the Sega Genesis.

Calculators
Variants of BASIC are available on graphing and otherwise programmable calculators made by Texas Instruments (TI-BASIC), HP (HP BASIC), Casio (Casio BASIC), and others.

Windows command-line
QBasic, a version of Microsoft QuickBASIC without the linker to make EXE files, is present in the Windows NT and DOS-Windows 95 streams of operating systems and can be obtained for more recent releases like Windows 7 which do not have them. Prior to DOS 5, the Basic interpreter was GW-Basic. QuickBasic is part of a series of three languages issued by Microsoft for the home and office power user and small-scale professional development; QuickC and QuickPascal are the other two. For Windows 95 and 98, which do not have QBasic installed by default, they can be copied from the installation disc, which will have a set of directories for old and optional software; other missing commands like Exe2Bin and others are in these same directories.

Other
The various Microsoft, Lotus, and Corel office suites and related products are programmable with Visual Basic in one form or another, including LotusScript, which is very similar to VBA 6. The Host Explorer terminal emulator uses WWB as a macro language; or more recently the programme and the suite in which it is contained is programmable in an in-house Basic variant known as Hummingbird Basic. The VBScript variant is used for programming web content, Outlook 97, Internet Explorer, and the Windows Script Host. WSH also has a Visual Basic for Applications (VBA) engine installed as the third of the default engines along with VBScript, JScript, and the numerous proprietary or open source engines which can be installed like PerlScript, a couple of Rexx-based engines, Python, Ruby, Tcl, Delphi, XLNT, PHP, and others; meaning that the two versions of Basic can be used along with the other mentioned languages, as well as LotusScript, in a WSF file, through the component object model, and other WSH and VBA constructions. VBScript is one of the languages that can be accessed by the 4Dos, 4NT, and Take Command enhanced shells. SaxBasic and WWB are also very similar to the Visual Basic line of Basic implementations. The pre-Office 97 macro language for Microsoft Word is known as WordBASIC. Excel 4 and 5 use Visual Basic itself as a macro language. Chipmunk Basic, an old-school interpreter similar to BASICs of the 1970s, is available for Linux, Microsoft Windows and macOS.

Legacy
The ubiquity of BASIC interpreters on personal computers was such that textbooks once included simple "Try It In BASIC" exercises that encouraged students to experiment with mathematical and computational concepts on classroom or home computers. Popular computer magazines of the day typically included type-in programs.

Futurist and sci-fi writer David Brin mourned the loss of ubiquitous BASIC in a 2006 Salon article as have others who first used computers during this era. In turn, the article prompted Microsoft to develop and release Small Basic; it also inspired similar projects like Basic-256 and the web based Quite Basic. Dartmouth held a 50th anniversary celebration for BASIC on 1 May 2014, as did other organisations; at least one organisation of VBA programmers organised a 35th anniversary observance in 1999. The pedagogical use of BASIC has been followed by other languages, such as Pascal, Java and particularly Python.

Dartmouth College celebrated the 50th anniversary of the BASIC language with a day of events on April 30, 2014. A short documentary film was produced for the event.

Data manipulation

 * : assigns a value (which may be the result of an expression) to a variable. In most dialects of BASIC,  is optional, and a line with no other identifiable keyword will assume the keyword to be.
 * : holds a list of values which are assigned sequentially using the READ command.
 * : reads a value from a  statement and assigns it to a variable. An internal pointer keeps track of the last   element that was read and moves it one position forward with each  . Most dialects allow multiple variables as parameters, reading several values in a single operation.
 * : resets the internal pointer to the first  statement, allowing the program to begin  ing from the first value. Many dialects allow an optional line number or ordinal value to allow the pointer to be reset to a selected location.
 * : Sets up an array.

Program flow control

 * : used to perform comparisons or make decisions. Early dialects only allowed a line number after the, but later versions allowed any valid statement to follow.   was not widely supported, especially in earlier versions.
 * : repeat a section of code a given number of times. A variable that acts as a counter, the "index", is available within the loop.
 * and  : repeat a section of code while the specified condition is true. The condition may be evaluated before each iteration of the loop, or after. Both of these commands are found mostly in later dialects.
 * or  : repeat a section of code indefinitely or while/until the specified condition is true. The condition may be evaluated before each iteration of the loop, or after. Similar to , these keywords are mostly found in later dialects.
 * : jumps to a numbered or labelled line in the program. Most dialects also allowed the form GO TO.
 * : jumps to a numbered or labelled line, executes the code it finds there until it reaches a  command, on which it jumps back to the statement following the , either after a colon, or on the next line. This is used to implement subroutines.
 * : chooses where to jump based on the specified conditions. See Switch statement for other forms.
 * : a pair of keywords introduced in the early 1960s to define functions. The original BASIC functions were modelled on FORTRAN single-line functions. BASIC functions were one expression with variable arguments, rather than subroutines, with a syntax on the model of  at the beginning of a program. Function names were originally restricted to FN, plus one letter, i.e., FNA, FNB ...

Input and output

 * : displays the full source code of the current program.
 * : displays a message on the screen or other output device.
 * : asks the user to enter the value of a variable. The statement may include a prompt message.
 * : used with  to set the position where the next character will be shown on the screen or printed on paper.   is an alternative form.
 * : prints out a number of space characters. Similar in concept to  but moves by a number of additional spaces from the current column rather than moving to a specified column.

Mathematical functions

 * : Absolute value
 * : Arctangent (result in radians)
 * : Cosine (argument in radians)
 * : Exponential function
 * : Integer part (typically floor function)
 * : Natural logarithm
 * : Random number generation
 * : Sine (argument in radians)
 * : Square root
 * : Tangent (argument in radians)

Miscellaneous

 * : holds a programmer's comment or REMark; often used to give a title to the program and to help identify the purpose of a given section of code.
 * ("User Serviceable Routine"): transfers program control to a machine language subroutine, usually entered as an alphanumeric string or in a list of DATA statements.
 * : alternative form of  found in some dialects. Does not require an artificial parameter to complete the function-like syntax of , and has a clearly defined method of calling different routines in memory.
 * /  : turns on display of each line number as it is run ("TRace ON"). This was useful for debugging or correcting of problems in a program. TROFF turns it back off again.
 * : some compilers such as Freebasic, Purebasic, and Powerbasic also support inline assembly language, allowing the programmer to intermix high-level and low-level code, typically prefixed with "ASM" or "!" statements.

Data types and variables
Minimal versions of BASIC had only integer variables and one- or two-letter variable names, which minimized requirements of limited and expensive memory (RAM). More powerful versions had floating-point arithmetic, and variables could be labelled with names six or more characters long. There were some problems and restrictions in early implementations; for example, Applesoft BASIC allowed variable names to be several characters long, but only the first two were significant, thus it was possible to inadvertently write a program with variables "LOSS" and "LOAN", which would be treated as being the same; assigning a value to "LOAN" would silently overwrite the value intended as "LOSS". Keywords could not be used in variables in many early BASICs; "SCORE" would be interpreted as "SC" OR "E", where OR was a keyword. String variables are usually distinguished in many microcomputer dialects by having $ suffixed to their name as a sigil, and values are often identified as strings by being delimited by "double quotation marks". Arrays in BASIC could contain integers, floating point or string variables.

Some dialects of BASIC supported matrices and matrix operations, which can be used to solve sets of simultaneous linear algebraic equations. These dialects would directly support matrix operations such as assignment, addition, multiplication (of compatible matrix types), and evaluation of a determinant. Many microcomputer BASICs did not support this data type; matrix operations were still possible, but had to be programmed explicitly on array elements.

Unstructured BASIC
New BASIC programmers on a home computer might start with a simple program, perhaps using the language's PRINT statement to display a message on the screen; a well-known and often-replicated example is Kernighan and Ritchie's "Hello, World!" program:

An infinite loop could be used to fill the display with the message:

Note that the  statement is optional and has no action in most dialects of BASIC. It was not always included, as is the case in this example. This same program can be modified to print a fixed number of messages using the common  statement:

Most home computers BASIC versions, such as MSX BASIC and GW-BASIC, supported simple data types, loop cycles, and arrays. The following example is written for GW-BASIC, but will work in most versions of BASIC with minimal changes:

The resulting dialog might resemble:

What is your name: Mike Hello Mike How many stars do you want: 7 ******* Do you want more stars? yes How many stars do you want: 3 *** Do you want more stars? no Goodbye Mike

The original Dartmouth Basic was unusual in having a matrix keyword, MAT. Although not implemented by most later microprocessor derivatives, it is used in this example from the 1968 manual which averages the numbers that are input:

Structured BASIC
Second-generation BASICs (for example, VAX Basic, SuperBASIC, True BASIC, QuickBASIC, BBC BASIC, Pick BASIC, PowerBASIC, Liberty BASIC, QB64 and (arguably) COMAL) introduced a number of features into the language, primarily related to structured and procedure-oriented programming. Usually, line numbering is omitted from the language and replaced with labels (for GOTO) and procedures to encourage easier and more flexible design. In addition keywords and structures to support repetition, selection and procedures with local variables were introduced.

The following example is in Microsoft QuickBASIC:

Object-oriented BASIC
Third-generation BASIC dialects such as Visual Basic, Xojo, Gambas, StarOffice Basic, BlitzMax and PureBasic introduced features to support object-oriented and event-driven programming paradigm. Most built-in procedures and functions are now represented as methods of standard objects rather than operators. Also, the operating system became increasingly accessible to the BASIC language.

The following example is in Visual Basic .NET:

Standards

 * ANSI/ISO/IEC Standard for Minimal BASIC:
 * ANSI X3.60-1978 "For minimal BASIC"
 * ISO/IEC 6373:1984 "Data Processing—Programming Languages—Minimal BASIC"
 * ECMA-55 Minimal BASIC (withdrawn, similar to ANSI X3.60-1978)
 * ANSI/ISO/IEC Standard for Full BASIC:
 * ANSI X3.113-1987 "Programming Languages Full BASIC"
 * INCITS/ISO/IEC 10279-1991 (R2005) "Information Technology – Programming Languages – Full BASIC"
 * ANSI/ISO/IEC Addendum Defining Modules:
 * ANSI X3.113 Interpretations-1992 "BASIC Technical Information Bulletin # 1 Interpretations of ANSI 03.113-1987"
 * ISO/IEC 10279:1991/ Amd 1:1994 "Modules and Single Character Input Enhancement"
 * ECMA-116 BASIC (withdrawn, similar to ANSI X3.113-1987)

title: BASIC


text:
List of Byzantine emperors

The foundation of Constantinople in 330 AD marks the conventional start of the Eastern Roman Empire, which fell to the Ottoman Empire in 1453 AD. Only the emperors who were recognized as legitimate rulers and exercised sovereign authority are included, to the exclusion of junior co-emperors (symbasileis) who never attained the status of sole or senior ruler, as well as of the various usurpers or rebels who claimed the imperial title.

The following list starts with Constantine the Great, the first Christian emperor, who rebuilt the city of Byzantium as an imperial capital, Constantinople, and who was regarded by the later emperors as the model ruler. Modern historians distinguish this later phase of the Roman Empire as Byzantine due to the imperial seat moving from Rome to Byzantium, the Empire's integration of Christianity, and the predominance of Greek instead of Latin.

The Byzantine Empire was the direct legal continuation of the eastern half of the Roman Empire following the division of the Roman Empire in 395. Emperors listed below up to Theodosius I in 395 were sole or joint rulers of the entire Roman Empire. The Western Roman Empire continued until 476. Byzantine emperors considered themselves to be Roman emperors in direct succession from Augustus; the term "Byzantine" became convention in Western historiography in the 19th century. The use of the title "Roman Emperor" by those ruling from Constantinople was not contested until after the papal coronation of the Frankish Charlemagne as Holy Roman emperor (25 December 800).

In practice, according to the Hellenistic political system, the Byzantine emperor had been given total power through God to shape the state and its subjects, he was the last authority and legislator of the empire and all his work was in imitation of the sacred kingdom of God, also according to the Christian principles, he was the ultimate benefactor and protector of his people.

The title of all Emperors preceding Heraclius was officially "Augustus", although other titles such as Dominus were also used. Their names were preceded by Imperator Caesar and followed by Augustus. Following Heraclius, the title commonly became the Greek Basileus (Gr. Βασιλεύς), which had formerly meant sovereign, though Augustus continued to be used in a reduced capacity. Following the establishment of the rival Holy Roman Empire in Western Europe, the title "Autokrator" (Gr. Αὐτοκράτωρ) was increasingly used. In later centuries, the Emperor could be referred to by Western Christians as the "Emperor of the Greeks". Towards the end of the Empire, the standard imperial formula of the Byzantine ruler was "[Emperor's name] in Christ, Emperor and Autocrat of the Romans" (cf. Ῥωμαῖοι and Rûm).

Dynasties were a common tradition and structure for rulers and government systems in the medieval period. The principle or formal requirements for hereditary succession, however, was not a formal part of the Empire's governance, hereditary succession was a custom and tradition, carried on as habit and benefitted from some sense of legitimacy, but not as a "rule" or inviolable or unchallengeable requirement of for office at the time.

{| class="wikitable" style="width:100%" ! style="width:10%" | Portrait ! style="width:15%" | Name ! style="width:13%" | Reign ! style="width:62%" | Notes

 * colspan=4 |
 * colspan=4 |

Constantinian dynasty (306–363)
(30 years, 9 months and 27 days) (24 years, 1 month and 25 days)
 * align=center | Statua di Costantino ai musei capitolini.jpg
 * align=center | Constantine I "the Great" Κωνσταντῖνος ὁ Μέγας Fl. Valerius Constantinus
 * style="text-align:center" | 25 July 306 – 22 May 337
 * style="text-align:center" | 25 July 306 – 22 May 337
 * Born at Naissus c. 272 as the son of the Augustus Constantius and Helena. Proclaimed Augustus of the western empire upon the death of his father on 25 July 306, he became sole ruler of the western empire after the Battle of the Milvian Bridge in 312. In 324, he defeated the eastern Augustus Licinius and re-united the empire under his rule, reigning as sole emperor until his death. Constantine completed the administrative and military reforms begun under Diocletian, who had begun ushering in the Dominate period. Actively interested in Christianity, he played a crucial role in its development and the Christianization of the Roman world, through his convocation of the First Ecumenical Council at Nicaea. He is said to have received baptism on his deathbed. He also reformed coinage through the introduction of the gold solidus, and initiated a large-scale building program, crowned by the re-foundation the city of Byzantium as "New Rome", popularly known as Constantinople. He was regarded as the model of all subsequent Byzantine emperors.
 * align=center | INC-2070-a Солид. Констанций II. Ок. 347—355 гг. (аверс).png
 * align=center | Constantius II Κωνστάντιος Fl. Iulius Constantius
 * style="text-align:center" | 22 May 337 – 3 November 361
 * style="text-align:center" | 22 May 337 – 3 November 361
 * Born on 7 August 317, as the second surviving son of Constantine I, he inherited the eastern third of Roman Empire upon his father's death, sole Roman Emperor from 353, after the overthrow of the western usurper Magnentius. Constantius' reign saw military activity on all frontiers, and dissension between Arianism, favoured by the emperor, and the "Orthodox" supporters of the Nicene Creed. In his reign, Constantinople was accorded equal status to Rome, and the original Hagia Sophia was built. Constantius appointed Constantius Gallus and Julian as Caesares, and died on his way to confront Julian, who had risen up against him.

(1 year, 7 months and 23 days)
 * align=center | INC-1525-a Солид Юлиан II Отступник (аверс).png
 * align=center | Julian "the Apostate" Ἰουλιανὸς ὁ Ἀποστάτης Fl. Claudius Iulianus
 * style="text-align:center" | 3 November 361 – 26 June 363
 * style="text-align:center" | 3 November 361 – 26 June 363
 * Born in May 332, grandson of Constantius Chlorus and cousin of Constantius II. Proclaimed by his army in Gaul, became legitimate Emperor upon the death of Constantius. Killed on campaign against Sassanid Persia.

 * colspan=4 |
 * colspan=4 |

Non-dynastic (363–364)
(7 months and 21 days)
 * align=center | Jovian solidus.png
 * align=center | Jovian Ἰοβιανός Claudius Iovianus
 * style="text-align:center" | 27 June 363 – 17 February 364
 * style="text-align:center" | 27 June 363 – 17 February 364
 * Born c. 332. Captain of the guards under Julian, elected by the army upon Julian's death. Died on journey back to Constantinople.

 * colspan=4 |
 * colspan=4 |

Valentinianic dynasty (364–379)
(1 month and 2 days)
 * align=center | Restored head of Valentinian I (cropped).jpg
 * align=center | Valentinian I Οὐαλεντινιανός Valentinianus
 * style="text-align:center" | 26 February – 28 March 364
 * style="text-align:center" | 26 February – 28 March 364
 * Born in 321. An officer under Julian and Jovian, he was elected by the army upon Jovian's death. He soon appointed his younger brother Valens as Emperor of the East, while he himself ruled in the West. Died of cerebral haemorrhage in 375.

(14 years, 4 months and 12 days)
 * align=center | INC-1867-a Солид. Валент II. Ок. 375—378 гг. (аверс).png
 * align=center | Valens Οὐάλης
 * style="text-align:center" | 28 March 364 – 9 August 378
 * style="text-align:center" | 28 March 364 – 9 August 378
 * Born in 328. A soldier of the Roman army, he was appointed Emperor of the East by his elder brother Valentinian I. Killed at the Battle of Adrianople.

(5 months and 10 days)
 * align=center | Gratian Trier enhanced.jpg
 * align=center | Gratian Γρατιανός, Gratianus
 * style="text-align:center" | 9 August 378 – 19 January 379
 * style="text-align:center" | 9 August 378 – 19 January 379
 * Born on 18 April/23 May 359, the son of Valentinian I. Emperor of the West, he inherited rule of the East upon the death of Valens and appointed Theodosius I as Emperor of the East. Assassinated on 25 August 383 during the rebellion of Magnus Maximus.

 * colspan=4 |
 * colspan=4 |

Theodosian dynasty (379–457)
(15 years, 11 months and 29 days)
 * align=center | Bust of Theodosius I (cropped).jpg
 * align=center | Theodosius I "the Great" Θεοδόσιος ὁ Μέγας
 * style="text-align:center" | 19 January 379 – 17 January 395
 * style="text-align:center" | 19 January 379 – 17 January 395
 * Born on 11 January 347, in Spain. Aristocrat and military leader, brother-in-law of Gratian, who appointed him as emperor of the East. He reunited the whole Empire after defeating Eugenius at the Battle of the Frigidus, on 6 September 394. The last emperor to rule both halves of the Empire.

(13 years, 3 months and 14 days)
 * align=center | Arcadius Istanbul Museum (cropped).JPG
 * align=center | Arcadius Ἀρκάδιος
 * style="text-align:center" | 17 January 395 – 1 May 408
 * style="text-align:center" | 17 January 395 – 1 May 408
 * Born in 377/378, the eldest son of Theodosius I; proclaimed Augustus on 16 January 383. On the death of Theodosius I in 395, the Roman Empire was permanently divided between the Eastern Roman Empire, later referred to as the Byzantine Empire, and the Western Roman Empire. Theodosius' eldest son Arcadius became emperor in the East while his younger son Honorius became emperor in the West.

(42 years, 2 months and 27 days)
 * align=center | Theodosius II Louvre Ma1036 (cropped).jpg
 * align=center | Theodosius II Θεοδόσιος
 * style="text-align:center" | 1 May 408 – 28 July 450
 * style="text-align:center" | 1 May 408 – 28 July 450
 * Born on 10 April 401, the only son of Arcadius; proclaimed Augustus on 10 January 402. Succeeded upon the death of his father. As a minor, the praetorian prefect Anthemius was regent in 408–414. He died in a riding accident.

(6 years, 5 months and 2 days)
 * align=center | Solidus of Marcian.png
 * align=center | Marcian Μαρκιανός, Marcianus
 * style="text-align:center" | 25 August 450 – 27 January 457
 * style="text-align:center" | 25 August 450 – 27 January 457
 * Born in 396. A soldier and politician, he became emperor after being wed by the Augusta Pulcheria, sister of Theodosius II, following the latter's death. Died of gangrene.

 * colspan=4 |
 * colspan=4 |

Leonid dynasty (457–518)
(16 years, 11 months and 11 days)
 * align=center | Leo I Louvre Ma1012 n2 (cropped).jpg
 * align=center | Leo I "the Great" and "the Butcher" Λέων ὁ Μέγας / Μακέλλης
 * style="text-align:center" | 7 February 457 – 18 January 474
 * style="text-align:center" | 7 February 457 – 18 January 474
 * Born in Dacia c. 400, and of Bessian origin, Leo became a low-ranking officer and served as an attendant of the Gothic magister militum, Aspar, who chose him as emperor on Marcian's death. He was the first emperor to be crowned by the Patriarch of Constantinople, and the first one to legislate in Greek. His reign was marked by the pacification of the Danube and peace with Persia, which allowed him to intervene in the affairs of the West, supporting candidates for the throne and dispatching an expedition to recover Carthage from the Vandals in 468. Initially a puppet of Aspar, Leo began promoting the Isaurians as a counterweight to Aspar's Goths, marrying his daughter Ariadne to the Isaurian leader Tarasicodissa (Zeno). With their support, in 471 Aspar was murdered and Gothic power over the army was broken.

(10 months)
 * align=center | Solidus of Leo II.png
 * align=center | Leo II "the Little" Λέων ὁ μικρός
 * style="text-align:center" | 18 January – November 474
 * style="text-align:center" | 18 January – November 474
 * Born 468, he was the grandson of Leo I by Leo's daughter Ariadne and her Isaurian husband, Zeno. He was raised to Augustus on 17 November 473. Leo ascended the throne after the death of his grandfather on 18 January 474. He crowned his father as co-emperor and effective regent on 29 January, dying shortly after.

(11 months and 11 days) August 476 – 9 April 491 (14 years and 8 months)
 * align=center | Semissis of Zeno.png
 * align=center | Zeno Ζήνων (Ταρασικοδίσσας)
 * style="text-align:center" | 29 January 474 – 9 January 475
 * style="text-align:center" | 29 January 474 – 9 January 475
 * Born c. 425 in Isauria, originally named Tarasicodissa. As the leader of Leo I's Isaurian soldiers, he rose to comes domesticorum, married the emperor's daughter Ariadne and took the name Zeno, and played a crucial role in the elimination of Aspar and his Goths. He was named co-emperor by his son on 29 January 474 and became sole ruler upon the latter's death, but had to flee to his native country before Basiliscus in 475, regaining control of the capital in 476. Zeno concluded peace with the Vandals, saw off challenges against him by Illus and Verina, and secured peace in the Balkans by enticing the Ostrogoths under Theodoric the Great to migrate to Italy. Zeno's reign also saw the end of the western line of emperors. His pro-Monophysite stance made him unpopular and his promulgation of the Henotikon resulted in the Acacian Schism with the papacy.

(1 year and 7 months)
 * align=center | Solidus of Basiliscus.png
 * align=center | Basiliscus Βασιλίσκος
 * style="text-align:center" | 9 January 475 – August 476
 * style="text-align:center" | 9 January 475 – August 476
 * General and brother-in-law of Leo I, seized power from Zeno and crowned himself emperor on 12 January. Zeno was restored soon after. Died in 476/477

(27 years, 2 months and 28 days)
 * align=center | Anastasius I. minted 507-518.jpg
 * align=center | Anastasius I "Dicorus" Ἀναστάσιος ὁ Δίκορος
 * style="text-align:center" | 11 April 491 – 9 July 518
 * style="text-align:center" | 11 April 491 – 9 July 518
 * Born c. 430 at Dyrrhachium, he was a palace official (silentiarius) when he was chosen as her husband and Emperor by Empress-dowager Ariadne. He was nicknamed "Dikoros" (Latin: Dicorus), because of his heterochromia. Anastasius reformed the tax system and the Byzantine coinage and proved a frugal ruler, so that by the end of his reign he left a substantial surplus. His Monophysite sympathies led to widespread opposition, most notably the Revolt of Vitalian and the Acacian Schism. His reign was also marked by the first Bulgar raids into the Balkans and by a war with Persia over the foundation of Dara. He died childless.

 * colspan=4 |
 * colspan=4 |

Justinian dynasty (518–602)
(9 years and 23 days)
 * align=center | Justin I obverse.jpg
 * align=center | Justin I Ἰουστῖνος, Iustinus
 * style="text-align:center" | 9 July 518 – 1 August 527
 * style="text-align:center" | 9 July 518 – 1 August 527
 * Born c. 450 at Bederiana (Justiniana Prima), Dardania. Officer and commander of the Excubitors bodyguard under Anastasius I, he was elected by army and people upon the death of Anastasius I.

(38 years, 7 months and 13 days)
 * align=center | Mosaic of Justinianus I (cropped).jpg
 * align=center | Justinian I "the Great" Ἰουστινιανὸς ὁ Μέγας Petrus Sabbatius Iustinianus
 * style="text-align:center" | 1 April 527 – 14 November 565
 * style="text-align:center" | 1 April 527 – 14 November 565
 * Born in 482/483 at Tauresium (Taor), Macedonia. Nephew of Justin I, raised to co-emperor on 1 April 527. Succeeded on Justin I's death. Attempted to restore the western territories of the Empire, reconquering Italy, North Africa and parts of Spain. Also responsible for the corpus juris civilis, or the "body of civil law," which is the foundation of law for many modern European nations.

(12 years, 10 months and 21 days)
 * align=center | Solidus of Justin II (obverse).jpg
 * align=center | Justin II Ἰουστῖνος, Iustinus
 * style="text-align:center" | 14 November 565 – 5 October 578
 * style="text-align:center" | 14 November 565 – 5 October 578
 * Born c. 520. Nephew of Justinian I, he seized the throne on the death of Justinian I with support of army and Senate. Became insane, hence in 573–574 under the regency of his wife Sophia, and in 574–578 under the regency of Tiberius Constantine.

(3 years, 10 months and 19 days)
 * align=center | Tiberios II (obverse).jpg
 * align=center | Tiberius II Constantine Τιβέριος Κωνσταντῖνος Tiberius Constantinus
 * style="text-align:center" | 5 October 578 – 14 August 582
 * style="text-align:center" | 5 October 578 – 14 August 582
 * Born c. 535, commander of the Excubitors, friend and adoptive son of Justin. Was named Caesar and regent in 574. Succeeded on Justin II's death.

(20 years, 3 months and 14 days)
 * align=center | Solidus of Maurice (transitional issue).png
 * align=center | Maurice Μαυρίκιος Τιβέριος Mauricius Tiberius
 * style="text-align:center" | 14 August 582 – 27 November 602
 * style="text-align:center" | 14 August 582 – 27 November 602
 * Born in 539 at Arabissus, Cappadocia. Became an official and later a general. Married the daughter of Tiberius II and was proclaimed emperor on 13 August 582. Named his son Theodosius as co-emperor in 590. Deposed by Phocas and executed on 27 November 602 at Chalcedon.

 * colspan=4 |
 * colspan=4 |

Non-dynastic (602–610)
(7 years, 10 months and 12 days)
 * align=center | Solidus of Phocas sb 621 (obverse).jpg
 * align=center | Phocas Φωκᾶς, Focas
 * style="text-align:center" | 23 November 602 – 5 October 610
 * style="text-align:center" | 23 November 602 – 5 October 610
 * Subaltern in the Balkan army, he led a rebellion that deposed Maurice. Increasingly unpopular and tyrannical, he was deposed and executed by Heraclius.

 * colspan=4 |
 * colspan=4 |

Heraclian dynasty (610–695)
(30 years, 4 months and 6 days)
 * align=center | Heraclius solidus.jpg
 * align=center | Heraclius Ἡράκλειος
 * style="text-align:center" | 5 October 610 – 11 February 641
 * style="text-align:center" | 5 October 610 – 11 February 641
 * Born c. 575 as the eldest son of the Exarch of Africa, Heraclius the Elder. Began a revolt against Phocas in 609 and deposed him in October 610. Brought the Byzantine-Sassanid War of 602–628 to successful conclusion but was unable to stop the Muslim conquest of Syria. Replaced Latin with Greek as the official language of administration in the East.

(3 months and 14 days)
 * align=center | Solidus Heraclius Constantine Obverse.jpg
 * align=center | Heraclius Constantine Ἡράκλειος νέος Κωνσταντῖνος Heraclius novus Constantinus
 * style="text-align:center" | 11 February – 25 May 641
 * style="text-align:center" | 11 February – 25 May 641
 * Born on 3 May 612 as the eldest son of Heraclius by his first wife Fabia Eudokia. Named co-emperor on 22 January 613, he succeeded to throne with his younger brother Heraklonas following the death of Heraclius. Died of tuberculosis, allegedly poisoned by Empress-dowager Martina.

(8 months and 25 days)
 * align=center | Heraclius solidus sb 764 (obverse).png
 * align=center | HeraclonasἩρακλεωνᾶς, Heraclius
 * style="text-align:center" | 11 February – c. 5 November 641
 * style="text-align:center" | 11 February – c. 5 November 641
 * Born in 626 to Heraclius' second wife Martina, named co-emperor on 4 July 638. Succeeded to throne with Constantine III following the death of Heraclius. Sole emperor after the death of Constantine III, under the regency of Martina, but was forced to name Constans II co-emperor by the army, and was deposed by the Senate in September 641 (or early 642).

(26 years and 10 months)
 * align=center | Constans II solidus.png
 * align=center | Constans II "the Bearded" Ἡράκλειος Κωνσταντῖνος (Κώνστας) Heraclius Constantinus (Constans)
 * align=center | c. 5 November 641 – 15 July 668
 * align=center | c. 5 November 641 – 15 July 668
 * Born on 7 November 630, the son of Constantine III. Raised to co-emperor in summer 641 after his father's death due to army pressure, he became sole emperor after the forced abdication of his uncle Heraklonas. Baptized Heraclius, he reigned as Constantine. "Constans" is his nickname. Moved his seat to Syracuse, where he was assassinated, possibly on the orders of Mizizios.

(16 years and 10 months)
 * align=center | Constantine IV mosaic (cropped) (2).png
 * align=center | Constantine IV "the Younger" Κωνσταντῖνος ὁ νέος Constantinus
 * style="text-align:center" | September 668 – c. 10 July 685
 * style="text-align:center" | September 668 – c. 10 July 685
 * Born in 652, co-emperor since 13 April 654, he succeeded following the murder of his father Constans II. Erroneously called "Constantine the Bearded" by historians through confusion with his father. He called the Third Council of Constantinople which condemned the heresy of Monothelitism, repelled the First Arab Siege of Constantinople, and died of dysentery.

(10 years)
 * align=center | Justinian II mosaic (cropped).png
 * align=center | Justinian II "the Slit-nosed" Ἰουστινιανὸς ὁ Ῥινότμητος Iustinianus (first reign)
 * style="text-align:center" | c. 10 July 685 – 695
 * style="text-align:center" | c. 10 July 685 – 695
 * Born in 669, son of Constantine IV, he was named co-emperor in 681 and became sole emperor upon Constantine IV's death. Deposed by military revolt in 695, mutilated (hence his surname) and exiled to Cherson, whence he recovered his throne in 705.

 * colspan=4 |
 * colspan=4 |

Twenty Years' Anarchy (695–717)
(3 years)
 * align=center | Solidus of Leontius.png
 * align=center | Leontius Λεόντιος
 * style="text-align:center" | 695 – 698
 * style="text-align:center" | 695 – 698
 * General from Isauria, he deposed Justinian II and was overthrown in another revolt in 698. He was executed in February 706.

(7 years)
 * align=center | Solidus of Tiberius III Apsimar.png
 * align=center | Tiberius III (Apsimarus) Τιβέριος (Ἀψίμαρος)
 * style="text-align:center" | 698 – 705
 * style="text-align:center" | 698 – 705
 * Admiral of Germanic origin, originally named Apsimar. He rebelled against Leontius after a failed expedition. Reigned under the name of Tiberius until deposed by Justinian II in 705. Executed in February 706.

(6 years, 2 months and 14 days)
 * align=center | Solidus of Justinian II and Tiberius (obverse).jpg
 * align=center | Justinian II "the Slit-nosed" (second reign)
 * style="text-align:center" | c. 21 August 705 – 4 November 711
 * style="text-align:center" | c. 21 August 705 – 4 November 711
 * Returned on the throne with Bulgar support. Named son Tiberius as co-emperor in 706. Deposed and killed by military revolt.

(1 year, 6 months and 30 days)
 * align=center | Solidus of Philippicus.png
 * align=center | Philippicus (Bardanes) Φιλιππικός (Βαρδάνης) Filepicus
 * style="text-align:center" | 4 November 711 – 3 June 713
 * style="text-align:center" | 4 November 711 – 3 June 713
 * A general of Armenian origin, he deposed Justinian II and was in turn overthrown by a revolt of the Opsician troops.

(less than 2 years)
 * align=center | Tremissis of Anastasius II.png
 * align=center | Anastasius II Ἀρτέμιος Ἀναστάσιος Artemius Anastasius
 * style="text-align:center" | 4 June 713 – late 715
 * style="text-align:center" | 4 June 713 – late 715
 * Originally named Artemios. A bureaucrat and secretary under Philippicus, he was raised to the purple by the soldiers who overthrew Philippicus. Deposed by another military revolt, he led an abortive attempt to regain the throne in 718 and was killed.

(less than 2 years)
 * align=center | Coin of Theodosius III.png
 * align=center | Theodosius III Θεοδόσιος
 * style="text-align:center" | late 715 – 25 March 717
 * style="text-align:center" | late 715 – 25 March 717
 * A fiscal official, he was proclaimed emperor by the rebellious Opsician troops. Entered Constantinople in November 715. Abdicated following the revolt of Leo the Isaurian and became a monk.

 * colspan=4 |
 * colspan=4 |

Isaurian dynasty (717–802)
(24 years, 2 months and 24 days)
 * align=center | Solidus of Leo III the Isaurian.jpg
 * align=center | Leo III "the Isaurian" Λέων ὁ Ἴσαυρος
 * style="text-align:center" | 25 March 717 – 18 June 741
 * style="text-align:center" | 25 March 717 – 18 June 741
 * Born c. 685 in Germanikeia, Commagene, he became a general. Rose in rebellion and secured the throne in spring 717. Repelled the Second Arab Siege of Constantinople and initiated the Byzantine Iconoclasm.

(34 years, 2 months and 27 days)
 * align=center | Solidus of Leo III and Constantine V (reverse).jpg
 * align=center | Constantine V "the Dung-named" Κωνσταντῖνος Κοπρώνυμος
 * style="text-align:center" | 18 June 741 – 14 September 775
 * style="text-align:center" | 18 June 741 – 14 September 775
 * Born in July 718, the only son of Leo III. Co-emperor since 720, he succeeded upon his father's death. After overcoming the usurpation of Artabasdos, he continued his father's iconoclastic policies and won several victories against the Arabs and the Bulgars. He is given the surname "the Dung-named" by hostile later chroniclers.

(2 years and 5 months)
 * align=center | Solidus of Artabasdos.png
 * align=center | Artabasdos Ἀρτάβασδος
 * style="text-align:center" | June 741 – 2 November 743
 * style="text-align:center" | June 741 – 2 November 743
 * General and son-in-law of Leo III, Count of the Opsician Theme. Led a revolt that secured Constantinople, but was defeated and deposed by Constantine V, who blinded and tonsured him.

(4 years, 11 months and 25 days)
 * style="text-align:center" | Solidus of Leo IV and Constantine VI.png
 * align=center | Leo IV "the Khazar" Λέων ὁ Χάζαρος
 * style="text-align:center" | 14 September 775 – 8 September 780
 * style="text-align:center" | 14 September 775 – 8 September 780
 * Born on 25 January 750 as the eldest son of Constantine V. Co-emperor since 751, he succeeded upon his father's death.

(16 years, 11 months and 11 days)
 * style="text-align:center" | Solidus of Constantine VI.png
 * align=center | Constantine VI Κωνσταντῖνος
 * style="text-align:center" | 8 September 780 – 19 August 797
 * style="text-align:center" | 8 September 780 – 19 August 797
 * Born in 771, the only child of Leo IV. Co-emperor since 14 April 776, sole emperor upon Leo's death in 780, until 790 under the regency of his mother, Irene of Athens. He was overthrown on Irene's orders, blinded and imprisoned, probably dying of his wounds shortly after.

(5 years, 2 months and 12 days)
 * align=center | Solidus of Irene.png
 * align=center | Irene Εἰρήνη
 * style="text-align:center" | 19 August 797 – 31 October 802
 * style="text-align:center" | 19 August 797 – 31 October 802
 * Born c. 752 in Athens, she married Leo IV on 3 November 768 and was crowned empress on 17 December. Regent for her son Constantine VI in 780–790, she overthrew him in 797 and became empress-regnant. In 787 she called the Second Council of Nicaea which condemned the practice of iconoclasm and restored the veneration of icons to Christian practice. Deposed in a palace coup in 802, she was exiled and died on 9 August 803.

 * colspan=4 |
 * colspan=4 |

Nikephorian dynasty (802–813)
(8 years, 8 months and 26 days)
 * style="text-align:center" | Solidus of Nikephoros I.png
 * align=center | Nikephoros I "Genikos" or "the Logothete" Νικηφόρος ὁ Γενικός/ὁ Λογοθέτης
 * style="text-align:center" | 31 October 802 – 26 July 811
 * style="text-align:center" | 31 October 802 – 26 July 811
 * Logothetes tou genikou (general finance minister) under Irene, led initially successful campaigns against the Bulgars but was killed at the Battle of Pliska.

(2 months and 4 days)
 * style="text-align:center" | INC-1870-r Солид. Никифор I и его сын Ставракий. Ок. 803—811 гг. (реверс).png
 * align=center | Staurakios Σταυράκιος
 * style="text-align:center" | 26 July 811 – 2 October 811
 * style="text-align:center" | 26 July 811 – 2 October 811
 * Only son of Nikephoros I, crowned co-emperor in December 803. Succeeded on his father's death; however, he had been heavily wounded at Pliska and left paralyzed. He was forced to abdicate, and retired to a monastery where he died soon after.

(1 year, 9 months and 9 days)
 * align=center | Solidus of Michael I Rangabe.png
 * align=center | Michael I Rangabe Μιχαὴλ Ῥαγγαβέ
 * style="text-align:center" | 2 October 811 – 11 July 813
 * style="text-align:center" | 2 October 811 – 11 July 813
 * Son-in-law of Nikephoros I, he succeeded Staurakios on his abdication. Resigned after the revolt under Leo the Armenian and retired to a monastery, where he died on 11 January 844. Reigned with eldest son Theophylact as co-emperor.

 * colspan=4 |
 * colspan=4 |

Non-dynastic (813–820)
(7 years, 5 months and 14 days)
 * align=center | Leo V in Madrid Skylitzes.jpg
 * align=center | Leo V "the Armenian" Λέων ὁ Ἀρμένιος
 * style="text-align:center" | 11 July 813 – 25 December 820
 * style="text-align:center" | 11 July 813 – 25 December 820
 * General of Armenian origin, born c. 755. He rebelled against Michael I and became emperor. Appointed his son Symbatios co-emperor under the name of Constantine in 813. Revived Byzantine Iconoclasm. Murdered by a conspiracy led by Michael the Amorian.

 * colspan=4 |
 * colspan=4 |

Amorian dynasty (820–867)
(8 years, 9 months and 7 days)
 * align=center | Michael II in the Madrid Skylitzes.jpg
 * align=center | Michael II "the Amorian" Μιχαὴλ ὁ ἐξ Ἀμορίου
 * style="text-align:center" | 25 December 820 – 2 October 829
 * style="text-align:center" | 25 December 820 – 2 October 829
 * Born in 770 at Amorium, he became an army officer. A friend of Leo V, he was raised to high office but led the conspiracy that murdered him. Survived the rebellion of Thomas the Slav, lost Crete to the Arabs and faced the beginning of the Muslim conquest of Sicily, reinforced iconoclasm.

(12 years, 3 months and 18 days)
 * align=center | Theophilos (cropped).jpg
 * align=center | Theophilos Θεόφιλος
 * style="text-align:center" | 2 October 829 – 20 January 842
 * style="text-align:center" | 2 October 829 – 20 January 842
 * Born in 813, as the only son of Michael II. Crowned co-emperor on 12 May 821, he succeeded on his father's death.

(25 years, 8 months and 4 days)
 * align=center | Michael iii.jpg
 * align=center | Michael III "the Drunkard" Μιχαὴλ ὁ Μέθυσος
 * style="text-align:center" | 20 January 842 – 24 September 867
 * style="text-align:center" | 20 January 842 – 24 September 867
 * His precise date of birth is uncertain, but the balance of available evidence supports a birthdate in January 840. The son of Theophilos, he succeeded on Theophilos' death. Under the regency of his mother Theodora until 856, and under the effective control of his uncle Bardas in 862–866. Ended iconoclasm. Murdered by Basil the Macedonian. A pleasure-loving ruler, he was nicknamed "the Drunkard" by later, pro-Basil chroniclers.

 * colspan=4 |
 * colspan=4 |

Macedonian dynasty (867–1056)
(18 years, 11 months and 5 days)
 * align=center | Roman Emperor Basil I.png
 * align=center | Basil I "the Macedonian" Βασίλειος ὁ Μακεδών
 * align=center | 24 September 867 – 29 August 886
 * align=center | 24 September 867 – 29 August 886
 * Born in the Theme of Macedonia c. 811, he rose in prominence through palace service, becoming a favourite of Michael III, who crowned him co-emperor on 26 May 866. He overthrew Michael and established the Macedonian dynasty. He led successful wars in the East against the Arabs and the Paulicians, and recovered southern Italy for the Empire.

(25 years, 8 months and 12 days)
 * align=center | [[File:Detail of the Imperial Gate mosaic in Hagia Sophia showing Leo VI the Wise (cropped).jpg|113x113px]]
 * align=center | Leo VI "the Wise" Λέων ὁ Σοφός
 * style="text-align:center" | 29 August 886 – 11 May 912
 * style="text-align:center" | 29 August 886 – 11 May 912
 * Born on 19 September 866, either the legitimate son of Basil I or the illegitimate son of Michael III. Co-emperor since 6 January 870. Leo was known for his erudition. His reign saw a height in Saracen (Muslim) naval raids, culminating in the Sack of Thessalonica, and was marked by unsuccessful wars against the Bulgarians under Simeon I.

(1 year and 26 days)
 * align=center | Emperor Alexander head.jpg
 * align=center | Alexander Ἀλέξανδρος
 * style="text-align:center" | 11 May 912 – 6 June 913
 * style="text-align:center" | 11 May 912 – 6 June 913
 * Son of Basil I, Alexander was born in 870 and raised to co-emperor in 879. Sidelined by Leo VI, Alexander dismissed his brother's principal aides on his accession. He died of exhaustion after a polo game.

(46 years, 5 months and 3 days)
 * align=center | Constantine VII Porphyrogenitus.jpg
 * align=center | Constantine VII Porphyrogenitus Κωνσταντῖνος ὁ Πορφυρογέννητος
 * style="text-align:center" | 6 June 913 – 9 November 959
 * style="text-align:center" | 6 June 913 – 9 November 959
 * Son of Leo VI, he was born on 17/18 May 905 and raised to co-emperor on 15 May 908. His early reign was dominated by successive regencies, first by his mother, Zoe Karbonopsina, and Patriarch Nicholas Mystikos, and from 919 by the admiral Romanos Lekapenos, who wedded his daughter to Constantine and was crowned senior emperor in 920. Constantine re-asserted his control by deposing Romanos's sons on 27 January 945. His reign was marked by struggles with Sayf al-Dawla in the East and an unsuccessful campaign against Crete, and pro-aristocratic policies that saw a partial reversal of Lekapenos' legislation against the dynatoi. He is notable for his promotion of the "Macedonian Renaissance", sponsoring encyclopaedic works and histories. He was a prolific writer himself, best remembered for the manuals on statecraft (De administrando imperio) and ceremonies (De ceremoniis) he compiled for his son.

(24 years and 3 days)
 * align=center | Romanos I in Madrid Skylitzes.jpg
 * align=center | Romanos I Lekapenos Ῥωμανὸς Λεκαπηνός
 * style="text-align:center" | 17 December 920 – 20 December 944
 * style="text-align:center" | 17 December 920 – 20 December 944
 * An admiral of lowly origin, Romanos rose to power as a protector of the young Constantine VII against the general Leo Phokas the Elder. After becoming the emperor's father-in-law, he successively assumed higher offices until he crowned himself senior emperor. His reign was marked by the end of warfare with Bulgaria and the great conquests of John Kourkouas in the East. Romanos promoted his sons Stephen and Constantine (alongside Christopher, who died soon after) as co-emperors over Constantine VII, but was himself overthrown by them and confined to an island as a monk. He died there on 15 June 948.

(3 years, 4 months and 6 days)
 * align=center | Romanos et Eudoxie (cropped).JPG
 * align=center | Romanos II "the Purple-born" Ῥωμανὸς ὁ Πορφυρογέννητος
 * style="text-align:center" | 9 November 959 – 15 March 963
 * style="text-align:center" | 9 November 959 – 15 March 963
 * The only surviving son of Constantine VII, he was born on 15 March 938 and succeeded his father on the latter's death. He ruled until his own death, although the government was led mostly by the eunuch Joseph Bringas. His reign was marked by successful warfare in the East against Sayf al-Dawla and the recovery of Crete by general Nikephoros Phokas.

(6 years, 3 months and 25 days)
 * align=center | Nikephoros Phokas (cropped 1).jpg
 * align=center | Nikephoros II Phokas Νικηφόρος Φωκᾶς
 * style="text-align:center" | 16 August 963 – 11 December 969
 * style="text-align:center" | 16 August 963 – 11 December 969
 * The most successful general of his generation, Nikephoros II was born c. 912 to the powerful Phokas clan. After the death of Romanos II, he rose to the throne with the support of the army and people as regent for the young emperors Basil II and Constantine VIII, marrying the empress-dowager Theophano. Throughout his reign he led campaigns in the East, conquering much of Syria. He was murdered by his nephew and one-time associate John Tzimiskes.

(6 years and 30 days)
 * align=center | John I in Madrid Skylitzes2.jpg
 * align=center | John I Tzimiskes Ἰωάννης ὁ Τσιμισκὴς
 * style="text-align:center" | 11 December 969 – 10 January 976
 * style="text-align:center" | 11 December 969 – 10 January 976
 * Nephew of Nikephoros Phokas, Tzimiskes was born c. 925. A successful general, he fell out with his uncle and led a conspiracy of disgruntled generals who murdered him. Tzimiskes succeeded Nikephoros as emperor and regent for the young sons of Romanos II. As ruler, Tzimiskes crushed the Rus' in Bulgaria and ended the Bulgarian tsardom before going on to campaign in the East, where he died.

(49 years, 11 months and 5 days)
 * align=center | Basil II crop.png
 * align=center | Basil II "the Bulgar-Slayer" Βασίλειος ὁ Βουλγαροκτόνος
 * style="text-align:center" | 10 January 976 – 15 December 1025
 * style="text-align:center" | 10 January 976 – 15 December 1025
 * Eldest son of Romanos II, Basil was born in 958. The first decade of his reign was marked by rivalry with the powerful Basil Lekapenos, an unsuccessful war against Bulgaria, and rebellions by generals in Asia Minor. Basil solidified his position through a marriage alliance with Vladimir I of Kiev, and after suppressing the revolts, he embarked on his conquest of Bulgaria. Bulgaria was finally subdued in 1018 after over 20 years of war, interrupted only by sporadic warfare in Syria against the Fatimid Caliphate. Basil also expanded Byzantine control over most of Armenia. His reign is widely considered as the apogee of medieval Byzantium.

(2 years, 10 months and 28 days)
 * align=center | Constantine VIII in the Exultet roll (2).jpg
 * align=center | Constantine VIII Κωνσταντῖνος ὁ Πορφυρογέννητος
 * style="text-align:center" | 15 December 1025– 12 November 1028
 * style="text-align:center" | 15 December 1025– 12 November 1028
 * The second son of Romanos II, Constantine was born in 960 and raised to co-emperor on 30 March 962. During the rule of Basil II, he spent his time in idle pleasure. During his short reign he was an indifferent ruler, easily influenced by his courtiers and suspicious of plots to depose him, especially among the military aristocracy, many of whom were blinded and exiled.

(5 years, 4 months and 30 days)
 * align="center" | Romanos III in Madrid Skylitzes.png
 * align="center" | Romanos III Argyros Ῥωμανὸς Ἀργυρός
 * style="text-align:center" | 15 November 1028 – 11 April 1034
 * style="text-align:center" | 15 November 1028 – 11 April 1034
 * Born in 968, the elderly aristocrat Romanos was chosen by Constantine VIII on his deathbed as Zoe's husband and succeeded on the throne after Constantine's death a few days later.

(7 years, 7 months and 28 days)
 * align="center" | Michael IV the Paphlagonian (cropped).jpg
 * align="center" | Michael IV "the Paphlagonian" Μιχαὴλ ὁ Παφλαγών
 * style="text-align:center" | 11 April 1034 – 10 December 1041
 * style="text-align:center" | 11 April 1034 – 10 December 1041
 * Born in 1010, he became a lover of Zoe even while Romanos III was alive, and succeeded him upon his death as her husband and emperor. Aided by his older brother, the eunuch John the Orphanotrophos, his reign was moderately successful against internal rebellions, but his attempt to recover Sicily failed. He died after a long illness.

(4 months and 8 days)
 * align="center" | Michael V in Madrid Skylitzes.jpg
 * align="center" | Michael V "the Caulker" Μιχαὴλ ὁ Καλαφάτης
 * style="text-align:center" | 10 December 1041 – 20 April 1042
 * style="text-align:center" | 10 December 1041 – 20 April 1042
 * Born in 1015, he was the nephew and adopted son of Michael IV. During his reign he tried to sideline Zoe, but a popular revolt forced him to restore her as empress on 19 April 1042, along with her sister Theodora. He was deposed the next day, castrated and tonsured, dying on 24 August 1042.

(1 month and 22 days)
 * align="center" | Zoe mosaic Hagia Sophia.jpg
 * align="center" | Zoe "the Purple-born" Ζωὴ ἡ Πορφυρογέννητος
 * style="text-align:center" | 21 April – 12 June 1042
 * style="text-align:center" | 21 April – 12 June 1042
 * The daughter of Constantine VIII, she succeeded on her father's death, as the only surviving member of the Macedonian dynasty, along with her sister Theodora. Her three husbands, Romanos III (1028–1034), Michael IV (1034–1041) and Constantine IX (1042–1050) ruled alongside her.

12 June 1042 (1 month and 22 days)
 * align=center | Theodora Porphyrogenita crown.jpg
 * align=center | Theodora "the Purple-born" Θεοδώρα ἡ Πορφυρογέννητος
 * style="text-align:center" | 21 April –
 * style="text-align:center" | 21 April –

11 January 1055 – 31 August 1056

(1 year, 7 months, 20 days)
 * The younger sister of Zoe, born in 984, she was raised as co-ruler on 19 April 1042. After Zoe married her third husband, Constantine IX, in June 1042, Theodora was again sidelined. After Zoe died in 1050 and Constantine in 1055, Theodora assumed full governance of the Empire and reigned until her death. She nominated Michael VI as her successor.

(12 years, 6 months and 30 days)
 * align=center | Emperor Constantine IX.jpg
 * align=center | Constantine IX Monomachos Κωνσταντῖνος Μονομάχος
 * style="text-align:center" | 12 June 1042 – 11 January 1055
 * style="text-align:center" | 12 June 1042 – 11 January 1055
 * Born c. 1000 of noble origin, he had an undistinguished life but was exiled to Lesbos by Michael IV, returning when he was chosen as Zoe's third husband. Constantine supported the mercantile classes and favoured the company of intellectuals, thereby alienating the military aristocracy. A pleasure-loving ruler, he lived an extravagant life with his favourite mistresses and endowed a number of monasteries, chiefly the Nea Moni of Chios and the Mangana Monastery. His reign was marked by invasions by the Pechenegs in the Balkans and the Seljuk Turks in the East, the revolts of George Maniakes and Leo Tornikios, and the Great Schism between the patriarchates of Rome and Constantinople.

 * colspan=4 |
 * colspan=4 |

Non-dynastic (1056–1057)
"Stratiotikos" / "the Old"]] Μιχαὴλ Βρίγγας ὁ Στρατιωτικός/ὁ Γέρων (1 year and 8 days)
 * align=center | 132 - Michael VI Bringas (Mutinensis - color) (cropped).png
 * align=center | [[Michael VI Bringas|Michael VI Bringas
 * align=center | [[Michael VI Bringas|Michael VI Bringas
 * style="text-align:center" | 31 August 1056 – 30/31 August 1057
 * A court bureaucrat and stratiotikos logothetes (hence his first sobriquet). Crowned emperor by Theodora on 22 August 1056. Deposed by military revolt under Isaac Komnenos, he retired to a monastery where he died in 1059.

 * colspan=4 |
 * colspan=4 |

Komnenid dynasty (1057–1059)
(2 years, 2 months and 21 days)
 * align=center | 133 - Isaac I Komnenos (Mutinensis - color).png
 * align=center | Isaac I Komnenos Ἰσαάκιος Κομνηνός
 * style="text-align:center" | 1 September 1057 – 22 November 1059
 * style="text-align:center" | 1 September 1057 – 22 November 1059
 * Born c. 1005. A successful general, he rose in revolt leading the eastern armies and was declared emperor on 8 June 1057; he was recognized after the abdication of Michael. He resigned in 1059 and died c. 1061.

 * colspan=4 |
 * colspan=4 |

Doukid dynasty (1059–1081)
(7 years and 6 months)
 * align=center | Constantine X portrait.jpg
 * align=center | Constantine X Doukas Κωνσταντῖνος Δούκας
 * style="text-align:center" | 23 November 1059 – 23 May 1067
 * style="text-align:center" | 23 November 1059 – 23 May 1067
 * Born in 1006, he became a general and close ally of Isaac Komnenos, and succeeded him as emperor on his abdication. Named his sons Michael, Andronikos and Konstantios as co-emperors. After his death his widow was regent until the accession of Romanus IV.

(3 years and 9 months)
 * align="center" | 136 - Romanos IV Diogenes (Mutinensis - color) (cropped).png
 * align="center" | Romanos IV Diogenes Ῥωμανὸς Διογένης
 * style="text-align:center" | 1 January 1068 – 1 October 1071
 * style="text-align:center" | 1 January 1068 – 1 October 1071
 * Born in 1032, a successful general he married empress-dowager Eudokia Makrembolitissa and became senior emperor as guardian of her sons by Constantine X. Deposed by the Doukas partisans after the Battle of Manzikert, blinded in June 1072 and exiled. He died soon after.

(6 years, 5 months and 23 days)
 * align="center" | Michael VII Doukas on the Holy Crown (cropped).jpg
 * align="center" | Michael VII Doukas "Parapinakes" Μιχαὴλ Δούκας "Παραπινάκης"
 * style="text-align:center" | 1 October 1071 – 24 March 1078
 * style="text-align:center" | 1 October 1071 – 24 March 1078
 * Born in 1050 as the eldest son of Constantine X. Co-emperor since 1059, he succeeded on his father's death. Due to his minority he was under the regency of his mother, Eudokia Makrembolitissa, in 1067–1068, and relegated to junior emperor under her second husband Romanos IV Diogenes in 1068–71. Senior emperor in 1071–78, he named his son Constantine co-emperor alongside his brothers. He abdicated before the revolt of Nikephoros Botaneiates, retired to a monastery and died c. 1090. His reign saw the devaluation of the Byzantine currency by 25%, hence his nickname "minus-a-quarter".

(2 years, 11 months and 29 days)
 * align=center | Nikephoros III (cropped).jpg
 * align=center | Nikephoros III Botaneiates Νικηφόρος Βοτανειάτης
 * style="text-align:center" | 27 March 1078 – 1 April 1081
 * style="text-align:center" | 27 March 1078 – 1 April 1081
 * Born in 1001, he was the strategos of the Anatolic Theme. He was proclaimed emperor on 7 January and crowned on 27 March or 3 April. He weathered several revolts, but was overthrown by the Komnenos clan. He retired to a monastery where he died in the same year.

 * colspan=4 |
 * colspan=4 |

Komnenid dynasty (1081–1185)
(37 years, 4 months and 14 days)
 * align=center | Alexios I Komnenos.jpg
 * align=center | Alexios I Komnenos Ἀλέξιος Κομνηνός
 * style="text-align:center" | 1 April 1081 – 15 August 1118
 * style="text-align:center" | 1 April 1081 – 15 August 1118
 * Born in 1056, a nephew of Isaac I Komnenos. A distinguished general, he overthrew Nikephoros III. His reign was dominated by wars against the Normans and the Seljuk Turks, as well as the arrival of the First Crusade and the establishment of independent Crusader states. He retained Constantine Doukas as co-emperor until 1087 and named his eldest son John co-emperor in 1092.

(24 years, 7 months and 24 days)
 * align=center | John II Komnenos - mosaic image digitally restored.png
 * align=center | John II Komnenos Ἰωάννης Κομνηνός
 * style="text-align:center" | 15 August 1118 – 8 April 1143
 * style="text-align:center" | 15 August 1118 – 8 April 1143
 * Born on 13 September 1087 as the eldest son of Alexios I. Co-emperor since 1092, he succeeded upon his father's death. His reign was focused on wars with the Turks. A popular, pious and frugal ruler, he was known as "John the Good". Named his eldest son Alexios co-emperor in 1122, but the son predeceased his father.

(37 years, 5 months and 16 days)
 * align=center | Manuel I Comnenus.jpg
 * align=center | Manuel I Komnenos Μανουὴλ Κομνηνός
 * style="text-align:center" | 8 April 1143 – 24 September 1180
 * style="text-align:center" | 8 April 1143 – 24 September 1180
 * Born on 28 November 1118 as the fourth and youngest son of John II, he was chosen as emperor over his elder brother Isaac by his father on his deathbed. An energetic ruler, he launched campaigns against the Turks, humbled Hungary, achieved supremacy over the Crusader states, and tried unsuccessfully to recover Italy and Egypt. His extravagance and constant campaigning, however, depleted the Empire's resources.

(3 years)
 * align=center | 142 - Alexios II Komnenos (Mutinensis - color).png
 * align=center | Alexios II Komnenos Ἀλέξιος Κομνηνός
 * style="text-align:center" | 24 September 1180 – c. September 1183
 * style="text-align:center" | 24 September 1180 – c. September 1183
 * Born on 14 September 1169 as the only son of Manuel I. In 1180–1182 under the regency of his mother, Maria of Antioch. She was overthrown by Andronikos I Komnenos, who became co-emperor and finally had Alexios II deposed and killed.

(2 years)
 * align=center | 143 - Andronikos I Komnenos (Mutinensis - color).png
 * align=center | Andronikos I Komnenos Ἀνδρόνικος Κομνηνός
 * style="text-align:center" | c. September 1183 – 12 September 1185
 * style="text-align:center" | c. September 1183 – 12 September 1185
 * Born c. 1118, a nephew of John II by his brother Isaac. A general, he was imprisoned for conspiring against John II, but escaped and spent 15 years in exile in various courts in eastern Europe and the Middle East. He seized the regency from Maria of Antioch in 1182 and subsequently throne from his nephew Alexios II. An unpopular ruler, he was overthrown and lynched in a popular uprising.

 * colspan=4 |
 * colspan=4 |

Angelid dynasty (1185–1204)
(9 years, 6 months and 27 days)
 * align=center | 144 - Isaac II Angelos (Mutinensis - color).png
 * align=center | Isaac II Angelos Ἰσαάκιος Ἄγγελος
 * style="text-align:center" | 12 September 1185 – 8 April 1195
 * style="text-align:center" | 12 September 1185 – 8 April 1195

1 August 1203 – 27 January 1204 (6 months and 8 days)
 * Born in September 1156, Isaac came to the throne at the head of a popular revolt against Andronikos I. His reign was marked by revolts and wars in the Balkans, especially against a resurgent Bulgaria. He was deposed, blinded and imprisoned by his elder brother, Alexios III. He was later restored to the throne by the Crusaders and Alexios IV. Due to their failure to deal with the Crusaders' demands, he was deposed by Alexios V Doukas in January 1204 and died in January 1204, perhaps of poison.

(8 years, 3 months and 10 days)
 * align=center | 145 - Alexios III Angelos (Mutinensis - color).png
 * align=center | Alexios III Angelos Ἀλέξιος Ἄγγελος
 * style="text-align:center" | 8 April 1195 – 18 July 1203
 * style="text-align:center" | 8 April 1195 – 18 July 1203
 * Born in 1153, Alexios was the elder brother of Isaac II. His reign was marked by misgovernment and the increasing autonomy of provincial magnates. He was deposed by the Fourth Crusade and fled Constantinople, roaming Greece and Asia Minor, searching for support to regain his throne. He died in Nicaean captivity (confined to a monastery) in 1211.

(6 months and 8 days)
 * align=center | 146 - Alexios IV Angelos (Mutinensis - color).png
 * align=center | Alexios IV Angelos Ἀλέξιος Ἄγγελος
 * style="text-align:center" | 19 July 1203 – 27 January 1204
 * style="text-align:center" | 19 July 1203 – 27 January 1204
 * Born in 1182, the son of Isaac II. He enlisted the Fourth Crusade to return his father to the throne, and reigned alongside his restored father from 19 July 1203. Due to their failure to deal with the Crusaders' demands, he was deposed by Alexios V Doukas in January 1204, and was strangled on 8 February.

(2 months and 16 days)
 * align=center | 147 - Alexios V Doukas (Mutinensis - color).png
 * align=center | Alexios V Doukas "Mourtzouphlos" Ἀλέξιος Δούκας ὁ "Μούρτζουφλος"
 * style="text-align:center" | 27 January 1204 – 12 April 1204
 * style="text-align:center" | 27 January 1204 – 12 April 1204
 * Born in 1140, the son-in-law of Alexios III and a prominent aristocrat, he deposed Isaac II and Alexios IV in a palace coup. He tried to repel the Crusaders, but they captured Constantinople forcing Mourtzouphlos to flee. He joined the exiled Alexios III, but was later blinded by the latter. Captured by the Crusaders, he was executed in December 1205.

 * colspan=4 |
 * colspan=4 |

Laskarid dynasty (Empire of Nicaea, 1204–1261)
(16 years and 6 months)
 * align=center | 148 - Theodore I Laskaris (Mutinensis - color).png
 * align=center | Theodore I Laskaris Θεόδωρος Λάσκαρις
 * style="text-align:center" | May 1205 – November 1221
 * style="text-align:center" | May 1205 – November 1221
 * Born c. 1174, he rose to prominence as a son-in-law of Alexios III. His brother Constantine Laskaris (or Theodore himself, it is uncertain) was elected emperor by the citizens of Constantinople on the day before the city fell to the Crusaders; Constantine only remained for a few hours before the sack of the city and later fled to Nicaea, where Theodore organized the Greek resistance to the Latins. Proclaimed emperor after Constantine's death in 1205, Theodore was crowned only in Easter 1208. He managed to stop the Latin advance in Asia and to repel Seljuk attacks, establishing the Empire of Nicaea as the strongest of the Greek successor states.

(32 years and 11 months)
 * align=center | 149 - John III Doukas Vatatzes (Mutinensis - color).png
 * align=center | John III Vatatzes Ἰωάννης Βατάτζης
 * style="text-align:center" | December 1221 – 3 November 1254
 * style="text-align:center" | December 1221 – 3 November 1254
 * Born c. 1192, he became the son-in-law and successor of Theodore I in 1212. A capable ruler and soldier, he expanded his state in Bithynia, Thrace and Macedonia at the expense of the Latin Empire, Bulgaria and the rival Greek state of Epirus.

(3 years, 9 months and 13 days)
 * align=center | 150 - Theodore II Laskaris (Mutinensis - color).png
 * align=center | Theodore II Laskaris Θεόδωρος Λάσκαρις
 * style="text-align:center" | 3 November 1254 – 16 August 1258
 * style="text-align:center" | 3 November 1254 – 16 August 1258
 * Born in 1221/1222 as the only son of John III, he succeeded on his father's death. His reign was marked by his hostility towards the major houses of the aristocracy, and by his victory against Bulgaria and the subsequent expansion into Albania.

(3 years, 4 months and 9 days)
 * align=center | 151 - John IV Laskaris (Mutinensis - color).png
 * align=center | John IV Laskaris Ἰωάννης Λάσκαρις
 * style="text-align:center" | 16 August 1258 – 25 December 1261
 * style="text-align:center" | 16 August 1258 – 25 December 1261
 * Born on 25 December 1250 as the only son of Theodore II, he succeeded on his father's death. Due to his minority, the regency was exercised at first by George Mouzalon until his assassination, and then by Michael Palaiologos, who within months was crowned senior emperor. After the recovery of Constantinople in August 1261, Palaiologos sidelined John IV completely, had him blinded and imprisoned. John IV died c. 1305.

 * colspan=4 |
 * colspan=4 |

Palaiologan dynasty (restored to Constantinople, 1261–1453)
(23 years, 11 months and 10 days)
 * align=center | Michael VIII Palaiologos (head) (cropped).jpg
 * align=center | Michael VIII Palaiologos Μιχαὴλ Παλαιολόγος
 * style="text-align:center" | 1 January 1259 – 11 December 1282
 * style="text-align:center" | 1 January 1259 – 11 December 1282
 * Born in 1223, great-grandson of Alexios III, grandnephew of John III by marriage. Senior emperor alongside John IV in 1259. His forces reconquered Constantinople on 25 July 1261, thus restoring the Empire. He entered the city and was crowned on 15 August. Became sole emperor after deposing John IV on 25 December 1261.

(45 years, 5 months and 13 days)
 * align=center | Andronikos II head.jpg
 * align=center | Andronikos II Palaiologos Ἀνδρόνικος Παλαιολόγος
 * style="text-align:center" | 11 December 1282 – 24 May 1328
 * style="text-align:center" | 11 December 1282 – 24 May 1328
 * Son of Michael VIII, born on 25 March 1259. Named co-emperor in 1261, crowned in 1272, he succeeded as sole emperor on Michael's death. Favouring monks and intellectuals, he neglected the army, and his reign saw the collapse of the Byzantine position in Asia Minor. He named his son Michael IX co-emperor. In a protracted civil war, he was first forced to recognize his grandson Andronikos III as co-emperor and was then deposed outright. He died on 13 February 1332.

(26 years, 4 months and 21 days)
 * align=center | 154 - Michael IX Palaiologos (Mutinensis - color).png
 * align=center | Michael IX Palaiologos Μιχαὴλ Παλαιολόγος
 * align=center | 21 May 1294 – 12 October 1320
 * align=center | 21 May 1294 – 12 October 1320

 * Son and co-ruler of Andronikos II, named co-emperor in 1281 but not crowned until 21 May 1294. Allegedly died of grief due to the accidental murder of his second son.

(13 years and 22 days)
 * align=center | Андроник III Палеолог (cropped).jpg
 * align=center | Andronikos III Palaiologos Ἀνδρόνικος Παλαιολόγος
 * style="text-align:center" | 24 May 1328 – 15 June 1341
 * style="text-align:center" | 24 May 1328 – 15 June 1341
 * Son of Michael IX, he was born on 25 March 1297 and named co-emperor in 1316. Rival emperor since July 1321, he deposed his grandfather Andronikos II in 1328 and ruled as sole emperor until his death. Supported by John Kantakouzenos, his reign saw defeats against the Ottoman emirate but successes in Europe, where Epirus and Thessaly were recovered.

(35 years, 1 month and 28 days)
 * align=center | Restored mosaic of John V Palaiologos (head cropped).jpg
 * align=center | John V Palaiologos Ἰωάννης Παλαιολόγος
 * style="text-align:center" | 15 July 1341 – 12 August 1376
 * style="text-align:center" | 15 July 1341 – 12 August 1376
 * Only son of Andronikos III, he had not been crowned or declared heir at his father's death, a fact which led to the outbreak of a destructive civil war between his regents and his father's closest aide, John VI Kantakouzenos, who was crowned co-emperor. The conflict ended in 1347 with Kantakouzenos recognized as senior emperor, but he was deposed by John V in 1354, during another civil war. Matthew Kantakouzenos, raised by John VI to co-emperor, was also deposed in 1357. John V appealed to the West for aid against the Ottomans, but in 1371 he was forced to recognize Ottoman suzerainty.

(7 years, 10 months and 2 days)
 * align=center | Johannes VI. Cantacuzenos (cropped).jpg
 * align=center | John VI Kantakouzenos Ἰωάννης Καντακουζηνός
 * style="text-align:center" | 8 February 1347– 10 December 1354
 * style="text-align:center" | 8 February 1347– 10 December 1354
 * A maternal relative of the Palaiologoi, he was declared co-emperor on 26 October 1341, and was recognized as senior emperor for ten years after the end of the civil war on 8 February 1347. Deposed by John V in 1354, he became a monk, dying on 15 June 1383.

(2 years, 10 months and 19 days)
 * align=center | 158 - Andronikos IV Palaiologos (Mutinensis - color) (cropped).png
 * align=center | Andronikos IV Palaiologos Ἀνδρόνικος Παλαιολόγος
 * style="text-align:center" | 12 August 1376 – 1 July 1379
 * style="text-align:center" | 12 August 1376 – 1 July 1379
 * Son of John V and grandson of John VI, he was born on 2 April 1348 and raised to co-emperor c. 1352. He deposed his father on 12 August 1376 and ruled until overthrown in turn in 1379. He was again recognized as co-emperor in 1381 and given Selymbria as an appanage, dying there on 28 June 1385.

(10 years, 9 months and 13 days)
 * align=center | Restored mosaic of John V Palaiologos (head cropped).jpg
 * align=center | John V Palaiologos (second reign)
 * style="text-align:center" | 1 July 1379 – 14 April 1390
 * style="text-align:center" | 1 July 1379 – 14 April 1390
 * Restored to senior emperor, he was reconciled with Andronikos IV in 1381, re-appointing him co-emperor. He was overthrown again in 1390 by his grandson, John VII.

(5 months and 3 days)
 * align=center | 159 - John VII Palaiologos (Mutinensis - color).png
 * align=center | John VII Palaiologos Ἰωάννης Παλαιολόγος
 * style="text-align:center" | 14 April 1390 – 17 September 1390
 * style="text-align:center" | 14 April 1390 – 17 September 1390
 * Son of Andronikos IV, he was born in 1370, and named co-emperor under his father in 1377–79. He usurped the throne from his grandfather John V for five months in 1390, but with Ottoman mediation he was reconciled with John V and his uncle, Manuel II. As regent, he held Constantinople against the Ottomans in 1399–1402, and was then given Thessalonica as an appanage, which he governed until his death on 22 September 1408.

(4 months and 30 days)
 * align=center | Restored mosaic of John V Palaiologos (head cropped).jpg
 * align=center | John V Palaiologos (third reign)
 * style="text-align:center" | 17 September 1390 – 16 February 1391
 * style="text-align:center" | 17 September 1390 – 16 February 1391
 * Restored to senior emperor, he ruled until his death in February 1391.

(34 years, 4 months and 5 days)
 * align=center | Manuel II Palaiologos (cropped).jpg
 * align=center | Manuel II Palaiologos Μανουὴλ Παλαιολόγος
 * style="text-align:center" | 16 February 1391 – 21 July 1425
 * style="text-align:center" | 16 February 1391 – 21 July 1425
 * Second son of John V, he was born on 27 June 1350. Raised to co-emperor in 1373, he became senior emperor on John V's death and ruled until his death. He journeyed to the West European courts seeking aid against the Turks, and was able to use the Ottoman defeat in the Battle of Ankara to regain some territories and throw off his vassalage to them.

(23 years, 4 months and 10 days)
 * align=center | Palaio.jpg
 * align=center | John VIII Palaiologos Ἰωάννης Παλαιολόγος
 * style="text-align:center" | 21 July 1425 – 31 October 1448
 * style="text-align:center" | 21 July 1425 – 31 October 1448
 * Eldest surviving son of Manuel II, he was born on 18 December 1392. Raised to co-emperor around 1416 and named full autokrator on 19 January 1421, he succeeded his father on his death. Seeking aid against the resurgent Ottomans, he ratified the Union of the Churches in 1439.

(4 years, 4 months and 23 days)
 * align=center | 162 - Constantine XI Palaiologos (Mutinensis - color).png
 * align=center | Constantine XI Dragases Palaiologos Κωνσταντῖνος Δραγάσης Παλαιολόγος
 * style="text-align:center" | 6 January 1449 – 29 May 1453
 * style="text-align:center" | 6 January 1449 – 29 May 1453
 * The fourth son of Manuel II and Serbian princess Helena Dragaš, he was born on 8 February 1405. As Despot of the Morea since 1428, he distinguished himself in campaigns that annexed the Principality of Achaea and brought the Duchy of Athens under temporary Byzantine suzerainty, but was unable to repel Turkish attacks under Turahan Bey. As the eldest surviving brother, he succeeded John VIII after the latter's death. Facing the designs of the new sultan, Mehmed II, on Constantinople, Constantine acknowledged the Union of the Churches and made repeated appeals for help to the West, but in vain. Refusing to surrender the city, he was killed during the final Ottoman attack on 29 May 1453.
 * }

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: List of Byzantine emperors