February 8

MIPS Assembly Data Types


Before moving towards coding is necessary to learn the basics of MIPS assembly language. Data type is one of the most important part to learn.

Data types that mips assembly support are given below in detail.


.ASCII is used to store string type data. An Ascii data type donot have a NULL terminator. i.e  ‘\0’ , called NUL in ASCII)




.ASCIIZ is used to store store string data but it has a Z at end which means it has a null terminator. Z is Ascii code for null terminator.




Byte (4 Bits) data type is used for single integers without any decimal places. It can also be used to store character. See the example Below:


value1: .byte 736

value2: .byte 'a'

value3: .byte 'b'

value4: .byte 2,3,4,5,5


A Halfword consists of two bytes. It is used to store half of a word. Each four bit is at address divisible by 2. See Example:


msg1: .halfword 'A'


In .word data is stored in the form of 32 Bits. Its double of half word. It can also be used to initialize an Array. You can also use positive or negative sign as its 32 bit. See Example:


msg1: .word -20

msg2: .word 30

Array1: .word 1,2,3,4,5,6,6,7,7


Float data type is used to store floating point value with single decimal value. see example:


float_value: .float 1.1

float_value1: .float 123.5


Double data type is used to store double value with more than one decimal places. See Example:


double_value: .double 1.10

double_value1: .double 123.55

Data Types And Size in Mips Assembly

Data Type Size
Halfword 16 bits
Word 32 bits
Byte 8 bits
Integer 32 bits
Character 4 bits


If there are any questions ask freely in the comment box.


You may also like