Convert file of strings to a base64 encoding

Assignment Help Assembly Language
Reference no: EM13759227

Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.

The encoding scheme to use is the same as that used in rfc1421.

Base64 encoding is a process by which three binary characters are encoded and replaced with 4 text characters. Text characters include A-Z, a-z, 0-9,+,/ (these are all easily printable characters and don't pose any problems to communication software, such as email.) We also use the '=' to represent "padded" characters.

So... Three characters is three bytes, three bytes is 24 bits. But you are going to divide these 24 bits into 4 sets of 6 bits. 2^6 = 64, hence base "64" encoding.

The subsequence "ABC" in a string would have the ASCII values 65 (01000001), 66 (01000010), and 67 (01000011) for a total 24 bit sequence of 010000010100001001000011. Chunking this into 6-bits chunks yields... 010000 010100 001001 000011. As 4 numbers this is 16, 20, 9, and 3. in RFC1421 this equates to the replacement sequence "QUJD"

If the number of letters in a string is not divisible for 3 pad it with = signs.

So take a file of multiple strings, Encode each line in RFC1421 Base64 encoding and output that line to a new file.

THe input file is called "input.txt" the output file shall be named "output64.txt"

Each input line will be less than 1024 characters

Each line may include binary data but will not include carriage return ('\r') or newline ('\n').

Each line will be terminated by the two character end of line sequence ("\r\n")

Reference no: EM13759227

Questions Cloud

Ecosystems : In this assignment, you will investigate the biotic and abiotic structure and function of an ecosystem. You will also investigate how ecosystems recover from disturbance naturally and through human restoration.
Discuss the significance of the independent film movement : American Film and Society Since 1945, or other cited sources. Discuss the significance of the Independent Film Movement in the 1990s. Examine some films or other breakthroughs in Independent Cinema.
Accommodate the network traffic : XUMUC is has the WAN links in place to the new locations in the Houston Region. XUMUC currently has 2 other Regions San Francisco and Denver.
What are some arguments for and against globalisation : Discuss some contrasting views and perspectives in relation to globalisation. What are some arguments for and against Globalisation?
Convert file of strings to a base64 encoding : Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.
What were the causes of and possible remedies for problem : Recall a time when you experienced a problem as result of poor communication. What were the causes of and possible remedies for the problem?
Calculate the expected rate of return for the portfolio : Calculate the expected rate of return for each stock separately and calculate the expected rate of return for the portfolio.
Explain erp systems : Explain ERP systems? How do they help the entire organization and so more comprehensive than CRM
Should the manager invest in the new equipment : The manager of a regional warehouse must decide on the number of loading docks to request for a new facility in order to minimize the sum of dock costs and driver-truck costs. The manager has learned that each driver-truck combination represents a co..

Reviews

Write a Review

Assembly Language Questions & Answers

  Write a complete well documented assembly language

write a complete well documented assembly language program (starts at $C000) that counts the number of 1s in each byte in a list. The LIST_IN starts at $C100 and it has 12 bytes ( create your own random bytes for the list). The results (count of 1s) ..

  Multiply by using shift and add instructionsyou have

multiply by using shift and add instructionsyou have studied shift and rotate instructions. when a number is shifted

  Decimal floating point number

What decimal floating point number does this IEEE 754 single precision number represent: 0x47C0_E6B7?

  Write a mips assembly language program

Write a MIPS assembly language program that prompts for a user to enter a series of floating point numbers and calls read_float to read in numbers and store them in an array. Then the program should display the array content on the console window. Th..

  Write an assembly program in mips

Write an assembly program in MIPS that get the array size from the keyboard, then reads a list of integers from the keyboard and writes the sorted list in ascending order to the console screen.

  How the expression is written in postfix notation

Describe the Floating Point Unit data stack and describe how the expression is written in postfix notation

  Prepare an assembly language program

Prepare an assembly language program that prints your full name on the screen. Use .ASCII pseudo-op to store the characters at the top of your program.

  Write a function to convert a given function

Write a function to convert a given function from infix to postfix in assembly. The basic structure of the function is given in the attached assembly language file.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write a program in assembly language which uses bios

write a program in assembly language which uses bios interrupt int 21 to read current system time and displays it on

  Write a program sequence that places the value in address

write a program sequence that places the value in address 1000 into accumulator a and places the value in address 1001

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd